Opened 12 years ago

Closed 12 years ago

#4213 closed (wontfix)

admin modifies values of pickled fields in db

Reported by: ochen@… Owned by: Adrian Holovaty
Component: contrib.admin Version: 0.96
Severity: Keywords: admin pickle decimal float cpickle
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


What I'm doing:
Store dictionary values in TextFields by using pickle / cPickle

What breaks:
Everything works fine as long as the admin interface doesnt modify the object. I can retreive the pickled objects fine up until the admin contrib modifies the object, even with such tasks as modifying an unrelated field. Dictionary values in the pickled TextFields get modified randomly, mostly doing with floats. Have had floats randomly mutated into Decimals as well as Strings. If the admin interface never manipulates the objects, the state of the pickles seem to be preserved (ha ha).

Change History (1)

comment:1 Changed 12 years ago by Simon G. <dev@…>

Resolution: wontfix
Status: newclosed

I'm not sure that the admin can (or should) try to guess the type of something like this and save it appropriately. You shou either set {{{editable=False}} in the model or write your own form handler with transparently unpickles and repickles the required field.

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