From 523968ffc9ca5fa597eefcf3505d0c456b059ea1 Mon Sep 17 00:00:00 2001 From: baoliang Date: Tue, 2 Feb 2021 10:12:08 +0800 Subject: [PATCH] add unqualified media --- polls/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/polls/models.py b/polls/models.py index 0d1f204..7f3425e 100644 --- a/polls/models.py +++ b/polls/models.py @@ -253,8 +253,9 @@ UNQUALIFIED_MEDIA_TYPE_CHOICES = ( class UnqualifiedMedia(models.Model): id = models.UUIDField('id', primary_key=True, default=uuid.uuid4) - media_id = models.UUIDField('media_id', on_delete=models.CASCADE) - type = models.IntegerField('Type', choices=UNQUALIFIED_MEDIA_TYPE_CHOICES, default=0) + media_id = models.UUIDField('media_id', null=True, blank=True) + type = models.IntegerField( + 'Type', choices=UNQUALIFIED_MEDIA_TYPE_CHOICES, default=0) result = models.TextField('result', null=True, blank=True) cou = models.IntegerField('count of update', default=0) dos = models.IntegerField('days of silent', default=0)