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


Ignore:
Timestamp:
Jun 7, 2022, 7:39:37 AM (2 years ago)
Author:
dennisvang

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10244, comment 19

    v7 v8  
    2929- `MyModel.objects.create(my_filefield=None).my_filefield is not None`
    3030- `my_model_instance.my_filefield` is always "truthy", so we need to check e.g. `my_filefield.name` ([https://stackoverflow.com/q/8850415 example])
    31 - we cannot use the `__isnull` field lookup, but have to check for equality with the empty string `''` ([https://stackoverflow.com/q/4771464 example])
     31- we cannot use the `__isnull` field lookup, but have to check for equality with the empty string `''`, or even `not in ['', None]` ([https://stackoverflow.com/q/4771464 example])
    3232- `FileField(null=True, unique=True)` is broken, because the database entry is `''` instead of `null`, so we get a unique-constraint violation if we try to create another instance with `None`
    3333
Back to Top