Changes between Version 8 and Version 9 of Ticket #10244, comment 19


Ignore:
Timestamp:
Jun 7, 2022, 7:41:51 AM (2 years ago)
Author:
dennisvang

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10244, comment 19

    v8 v9  
    1111We 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`.
    1212
    13 Basically, the passes, where `my_filefield` is a `FileField` with `null=True`:
     13Basically, the following snippet passes, where `my_filefield` is a `FileField` with `null=True`:
    1414
    1515{{{
Back to Top