mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #30477 -- Made reverse lookup use Field.get_db_prep_value() from the target field.
This commit is contained in:
@@ -67,10 +67,15 @@ class Annotation(models.Model):
|
||||
return self.name
|
||||
|
||||
|
||||
class DateTimePK(models.Model):
|
||||
date = models.DateTimeField(primary_key=True, auto_now_add=True)
|
||||
|
||||
|
||||
class ExtraInfo(models.Model):
|
||||
info = models.CharField(max_length=100)
|
||||
note = models.ForeignKey(Note, models.CASCADE, null=True)
|
||||
value = models.IntegerField(null=True)
|
||||
date = models.ForeignKey(DateTimePK, models.SET_NULL, null=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ['info']
|
||||
|
||||
Reference in New Issue
Block a user