Code

Opened 7 years ago

Closed 7 years ago

#4213 closed (wontfix)

admin modifies values of pickled fields in db

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

Description

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).

Attachments (0)

Change History (1)

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

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

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.

Add Comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.