Opened 8 years ago

Closed 7 years ago

#1759 closed defect (worksforme)

ManyToMany DoesNotExist exception when saving in the admin interface

Reported by: sandro Owned by: adrian
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: UI/UX:


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.

Attachments (0)

Change History (2)

comment:1 Changed 8 years ago by Chris Rose

  • milestone Version 0.91 deleted

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

  • Resolution set to worksforme
  • Status changed from new to closed
  • Version changed from magic-removal to SVN

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.