Opened 18 years ago

Closed 17 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: dev
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

Description

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:  http://djanghost.mine.nu:8001/admin/student_update/announcement/add/
  Exception Type:  DoesNotExist
  Exception Value:  Attachment does not exist for {'pk': None}
  Exception Location:  /home/santuri/magic-removal/django/db/models/query.py in get, line 191 

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

Change History (2)

comment:1 by Chris Rose, 18 years ago

milestone: Version 0.91

comment:2 by Simon G. <dev@…>, 17 years ago

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