Commits

Waldemar Kornewald committed 3216788

actually, that should be field.column

  • Participants
  • Parent commits fc01792

Comments (0)

Files changed (1)

djangotoolbox/fields.py

     def get_db_prep_value(self, (embedded_instance, embedded_dict), **kwargs):
         if embedded_dict is None:
             return None
-        values = dict()
+        values = {}
         for name, value in embedded_dict.iteritems():
             field = embedded_instance._meta.get_field(name)
-            values[field.attname] =  field.get_db_prep_value(value, **kwargs)
+            values[field.column] =  field.get_db_prep_value(value, **kwargs)
         if self.embedded_model is None:
             values.update({'_module' : embedded_instance.__class__.__module__,
                            '_model'  : embedded_instance.__class__.__name__})