(self, cls, name, **kwargs)
| 1556 | return super().pre_save(model_instance, add) |
| 1557 | |
| 1558 | def contribute_to_class(self, cls, name, **kwargs): |
| 1559 | super().contribute_to_class(cls, name, **kwargs) |
| 1560 | if not self.null: |
| 1561 | setattr( |
| 1562 | cls, |
| 1563 | "get_next_by_%s" % self.name, |
| 1564 | partialmethod( |
| 1565 | cls._get_next_or_previous_by_FIELD, field=self, is_next=True |
| 1566 | ), |
| 1567 | ) |
| 1568 | setattr( |
| 1569 | cls, |
| 1570 | "get_previous_by_%s" % self.name, |
| 1571 | partialmethod( |
| 1572 | cls._get_next_or_previous_by_FIELD, field=self, is_next=False |
| 1573 | ), |
| 1574 | ) |
| 1575 | |
| 1576 | def get_prep_value(self, value): |
| 1577 | value = super().get_prep_value(value) |
nothing calls this directly
no test coverage detected