Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1798 closed defect (invalid)

change of int-type choice field stopps changes to be saved

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


i have a field like

		(0, u'Foo', ),
		(1, u'Bar', ),
		(2, u'Whatever', ),
	type = models.IntegerField(default=0, verbose_name=u"Type", choices=TYPE_CHOICES )

and creating records with it works fine. but changing&saving records only works if the choice type field is not changed.

another strange thing: while this field does not allow null values the listbox shows the dashes-line.

and finally: if i change the record and set the choice to the dash-line i get the expected error. after that error i can change the choice-type to a value and it gets stored - strange.

Change History (4)

comment:1 Changed 12 years ago by mdt

the observation was wrong: the update is done correclty.

the overview-page was cached. i used this sequence for middleware:


is the sequence wrong or a bug in the cache logic?

comment:2 Changed 12 years ago by Bob Mokk

Type: defect

Best wishes.

comment:3 Changed 12 years ago by Malcolm Tredinnick

Resolution: invalid
Status: newclosed
Type: defect

So there doesn't appear to be a bug here any longer. If you are still having queries about the middleware, please ask on the django-users list.

comment:4 Changed 12 years ago by James Bennett

Malcolm, I have a suspicion that this went away when we fixed things to not cache the admin.

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