mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #36062 -- Handled serialization of CompositePrimaryKeys.
This commit is contained in:
@@ -48,3 +48,9 @@ class Post(models.Model):
|
||||
pk = models.CompositePrimaryKey("tenant_id", "id")
|
||||
tenant = models.ForeignKey(Tenant, on_delete=models.CASCADE)
|
||||
id = models.UUIDField()
|
||||
|
||||
|
||||
class TimeStamped(models.Model):
|
||||
pk = models.CompositePrimaryKey("id", "created")
|
||||
id = models.SmallIntegerField(unique=True)
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
Reference in New Issue
Block a user