mirror of
https://github.com/django/django.git
synced 2025-11-25 13:13:28 +00:00
Refs #21286 -- Fixed YAML serialization of TimeField primary key.
Handling for PyYAML not being able to serialize `datetime.time` values is moved from `handle_field` to `_value_from_field` as only non-primary key, non-relation fields are passed into `handle_field`.
This commit is contained in:
parent
c12bc980e5
commit
b9aa3239ab
3 changed files with 11 additions and 9 deletions
|
|
@ -245,8 +245,9 @@ class SmallPKData(models.Model):
|
|||
# class TextPKData(models.Model):
|
||||
# data = models.TextField(primary_key=True)
|
||||
|
||||
# class TimePKData(models.Model):
|
||||
# data = models.TimeField(primary_key=True)
|
||||
|
||||
class TimePKData(models.Model):
|
||||
data = models.TimeField(primary_key=True)
|
||||
|
||||
|
||||
class UUIDData(models.Model):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue