mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #30343 -- Fixed prefetch_related() for GenericForeignKey when PK of related field is UUIDField.
This commit is contained in:
@@ -2325,6 +2325,10 @@ class UUIDField(Field):
|
||||
def get_internal_type(self):
|
||||
return "UUIDField"
|
||||
|
||||
def get_prep_value(self, value):
|
||||
value = super().get_prep_value(value)
|
||||
return self.to_python(value)
|
||||
|
||||
def get_db_prep_value(self, value, connection, prepared=False):
|
||||
if value is None:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user