Opened 19 years ago

Closed 18 years ago

Last modified 18 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: dev
Severity: normal Keywords: choices null
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 a field like

	TYPE_CHOICES = (
		(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 by mdt, 19 years ago

the observation was wrong: the update is done correclty.

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

    "django.middleware.common.CommonMiddleware",
    "django.middleware.http.ConditionalGetMiddleware",
    "django.middleware.gzip.GZipMiddleware",
    "django.contrib.sessions.middleware.SessionMiddleware",
    "django.middleware.cache.CacheMiddleware",
    "django.contrib.auth.middleware.AuthenticationMiddleware",
    "django.middleware.doc.XViewMiddleware",

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

comment:2 by Bob Mokk, 18 years ago

Type: defect

Best wishes.
Halamadak!

comment:3 by Malcolm Tredinnick, 18 years ago

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 by James Bennett, 18 years ago

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