Changes between Version 2 and Version 3 of Ticket #30386, comment 6


Ignore:
Timestamp:
Oct 7, 2021, 8:35:52 AM (3 years ago)
Author:
Alexander Pervakov

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30386, comment 6

    v2 v3  
    11I'm dive deeper into this and found that `quote(obj.id)` maybe not the best option and should be debated but the presence of a warning message when `not isinstance(obj.pk, int)` would be great and will lead people to this thread. Because stackoverflow is full of questions about quoting the link in admin but no one provide refs to this ticket that I found after couple hours of code investigating and testing.
    22
    3 Something like this in django.db.models.fields.related.ForeignKey:
     3Something like this in django.db.models.fields.RelatedField:
    44
    55
    66{{{
    7 class ForeignKey(ForeignObject):
     7class RelatedField(FieldCacheMixin, Field):
    88
    99    def check(self, **kwargs):
    1010        return [
    11             *super().check(**kwargs),
    12             *self._check_on_delete(),
    13             *self._check_unique(),
     11            # ...
    1412            *self._check_pk_int(),
    1513        ]
Back to Top