Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#1798 closed defect (invalid)

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

Reported by: mdt@… Owned by: adrian
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:

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 Changed 9 years ago by mdt

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 Changed 9 years ago by Bob Mokk

  • Type defect deleted

Best wishes.
Halamadak!

comment:3 Changed 8 years ago by mtredinnick

  • Resolution set to invalid
  • Status changed from new to closed
  • Type set to 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 8 years ago by ubernostrum

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