On Sat, Jan 21, 2012 at 3:49 AM, Chris Seberino <cseber...@gmail.com> wrote: > I get the following error when attempting to delete an object of my > model... > > "AssertionError: Question object can't be deleted because its id > attribute is set to None." >
Models are representations of rows in a database. Deleting a model instance implies removing a row from a database. Model instances have an id attribute which denotes their row in the database. Models whose id is None don't exist in the database, and so it is nonsense to delete them - they don't exist. Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.