Ticket #34525: patch.diff

File patch.diff, 631 bytes (added by Mateusz Legięcki, 19 months ago)

suggestetd patch (without tests)

  • django/db/models/options.py

    diff --git a/django/db/models/options.py b/django/db/models/options.py
    index be3d68f390..7c7735e652 100644
    a b class Options:  
    206206
    207207            self.unique_together = normalize_together(self.unique_together)
    208208            self.index_together = normalize_together(self.index_together)
    209             if self.index_together:
     209            if self.index_together and cls.__module__ != "__fake__":
    210210                warnings.warn(
    211211                    f"'index_together' is deprecated. Use 'Meta.indexes' in "
    212212                    f"{self.label!r} instead.",
Back to Top