You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the EDTFField value is set on a model instance and the instance is subsequently re-saved with an empty natural_text_field value, the pre_save method fails because it tries to re-parse the existing EDTF field python value which is not a string.
The text was updated successfully, but these errors were encountered:
This is currently an issue for AGSA in particular because we are deliberately setting just the EDTF field on works without setting the corresponding natural_text_field value at all, which is backwards from the way the field wants to be used.
Improve performance of EDTFField when populating model
instances from DB values by storing EDTF data in pickled
format, not as string values that need to be re-parsed
every time they are loaded.
This implementation is naive and could be improved with
a more sophisticated serialization approach for EDTF
fields, though it works for now.
This change also handles the issue in #15 where already-
parsed EDTF field values are re-parsed when an instance
is saved, unless there is a `natural_text_field` value
present to override and reset the EDTF field value.
If the
EDTFField
value is set on a model instance and the instance is subsequently re-saved with an emptynatural_text_field
value, thepre_save
method fails because it tries to re-parse the existing EDTF field python value which is not a string.The text was updated successfully, but these errors were encountered: