The implementation of applyData returns lists that aren't automatically persistent.
Bug #419305 reported by
jhsware
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grok |
Invalid
|
Undecided
|
Unassigned | ||
zope.formlib |
Invalid
|
Undecided
|
Unassigned |
Bug Description
If you have a form based on a schema.List item,
tags = schema.
then applyData stores the results as a regular list() data type instead of the persistent PersistenList() data type. This is ok as long as you only manipulate the data with applyData, but that is quite a wild assumption.
I suggest changing the implementation of applyData to ALLWAYS use persistent data types, such as PersistentList. Otherwise an oversight might lead to very subtle but serious bugs resulting in loss of data.
To post a comment you must log in.
The result of a form is not always meant to be persistent.
The persistency is usually implemented in the Model itself, when you set the value of the attribute, for example.
The behavior described here is the intended one.