From 5895714fd5aed3c5f58d15c0356aa150e4cad226 Mon Sep 17 00:00:00 2001 From: Michal Kunc Date: Fri, 17 Feb 2023 15:07:21 +0100 Subject: [PATCH] Fix null -> blank --- .../0008_alter_movievote_comment.py | 19 +++++++++++++++++++ watchlist/models.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 watchlist/migrations/0008_alter_movievote_comment.py diff --git a/watchlist/migrations/0008_alter_movievote_comment.py b/watchlist/migrations/0008_alter_movievote_comment.py new file mode 100644 index 0000000..96a8b21 --- /dev/null +++ b/watchlist/migrations/0008_alter_movievote_comment.py @@ -0,0 +1,19 @@ +# Generated by Django 4.1.5 on 2023-02-17 14:06 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('watchlist', '0007_alter_movie_csfd_id_alter_movie_imdb_id'), + ] + + operations = [ + migrations.AlterField( + model_name='movievote', + name='comment', + field=models.TextField(blank=True, default=''), + preserve_default=False, + ), + ] diff --git a/watchlist/models.py b/watchlist/models.py index 5a984c6..01e8e8a 100644 --- a/watchlist/models.py +++ b/watchlist/models.py @@ -49,7 +49,7 @@ class MovieVote(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) vote = models.IntegerField(choices=Vote.choices, default=Vote.NOVOTE) seen = models.BooleanField(default=False, null=True) - comment = models.TextField(null=True) + comment = models.TextField(blank=True) def __str__(self): return f"{self.user.username}'s vote for {self.movie.name}"