Changes between Version 8 and Version 9 of Ticket #10244, comment 19
- Timestamp:
- Jun 7, 2022, 7:41:51 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #10244, comment 19
v8 v9 11 11 We can specify `null=True`, and we can assign `None` to the field, but this is stored as a `FieldFile` with `name=None` (initially) on the python side, and it is stored as an empty string `''` in the database. After e.g. `refresh_from_db`, the `FieldFile.name` will also be an empty string, instead of `None`. 12 12 13 Basically, the passes, where `my_filefield` is a `FileField` with `null=True`:13 Basically, the following snippet passes, where `my_filefield` is a `FileField` with `null=True`: 14 14 15 15 {{{