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
When the original field value is saved in the database as NULL, applying the migration will change the value to a string "None" because of the string interpolation used to construct an UPDATE statement in Migrators execute() method.
To reproduce:
Make a model with an optional field (null=True)
Create a record with that field being NULL
Convert the field to an Encrypted field
Run the migration with Migrator
The text was updated successfully, but these errors were encountered:
sommelon
changed the title
Migrator doesn't retain NULL values
Migrator converts NULL values to a string "None"
Apr 14, 2021
sommelon
added a commit
to sommelon/django-mirage-field
that referenced
this issue
Apr 14, 2021
Hi.
I am using SQLite 3 and I have this model
My migration looks like this
When the original field value is saved in the database as
NULL
, applying the migration will change the value to a string"None"
because of the string interpolation used to construct anUPDATE
statement inMigrator
sexecute()
method.To reproduce:
The text was updated successfully, but these errors were encountered: