Hi Django users,

I observed something weird while trying to update an existing database
record. I create new records by passing a dictionary as **kwargs to
.create(). This dictionary includes strings, integers and model
instances matching with my model fields. However, one model field is a
CharField that can be populated passing a model instance. This works
fine for create. But if I try to update this record passing the exactly
same dictionary as **kwargs to .update(), Django raises a TypeError
telling me that I cannot update that field because it is a CharField and
I cannot pass model instances.

... so is this a bug, because it works in .create() or must I adapt my
approach?


Thanks a lot for reply.
BR,
Henrik

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7012f455-7483-fab4-92c3-4cf943ef1a09%40posteo.de.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to