saving an istance of an object then trying to save it and it does not save

31 views
Skip to first unread message

Coulson Thabo Kgathi

unread,
May 16, 2014, 6:52:47 AM5/16/14
to django...@googlegroups.com
if o get an object like this

p = Plot.objects.get(plot_plot_identifier='123323423')

then do
p.selected=1
p.save()

this does not save dont know why.
the is no where the field is being modified anywhy not even on the save methon of the Plot model and there are no signals modifying the field at all.


Mario Gudelj

unread,
May 16, 2014, 8:57:06 PM5/16/14
to django...@googlegroups.com

That should work. Do you get any errors?

--
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 django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/273762b5-35a0-44c3-825f-045e1a275cc7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Coulson Thabo Kgathi

unread,
May 19, 2014, 7:57:42 AM5/19/14
to django...@googlegroups.com
Managed to figure it out.

In the save method of the object there was some code that resets the values to None
Reply all
Reply to author
Forward
0 new messages