Opened 13 years ago

Closed 12 years ago

#1759 closed defect (worksforme)

ManyToMany DoesNotExist exception when saving in the admin interface

Reported by: sandro Owned by: Adrian Holovaty
Component: contrib.admin Version: master
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I have these models:

class Attachment(models.Model):
  file = models.FileField(upload_to="attachments",null=True)

class Announcement(models.Model):
  attachments = models.ManyToManyField(Attachment,blank=True)

When I Add a new announcement in the django admin and hit 'Save' I am
brought to an error page that says:

DoesNotExist at /admin/student_update/announcement/add/
Attachment does not exist for {'pk': None}

  Request Method:  POST
  Request URL:
  Exception Type:  DoesNotExist
  Exception Value:  Attachment does not exist for {'pk': None}
  Exception Location:  /home/santuri/magic-removal/django/db/models/ in get, line 191 

The announcement does save, I just get this nasty error message as my POST response.

Change History (2)

comment:1 Changed 13 years ago by Chris Rose

milestone: Version 0.91

comment:2 Changed 12 years ago by Simon G. <dev@…>

Resolution: worksforme
Status: newclosed
Version: magic-removalSVN

I'm marking this as worksforme, as I'm unable to confirm this on a current svn, adding something to the announcements does not give any errors. If anyone else is having this issue, please reopen this ticket and provide more information.

Note: See TracTickets for help on using tickets.
Back to Top