From aadc132b1d1e24635c63294e98155629e999f2d9 Mon Sep 17 00:00:00 2001 From: Jacob Babor Date: Fri, 24 Jan 2025 16:15:47 -0600 Subject: [PATCH] Allow 0 tags --- .../0013_alter_odyseerelease_tags.py | 18 ++++++++++++++++++ odyseescraper/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 odyseescraper/migrations/0013_alter_odyseerelease_tags.py diff --git a/odyseescraper/migrations/0013_alter_odyseerelease_tags.py b/odyseescraper/migrations/0013_alter_odyseerelease_tags.py new file mode 100644 index 0000000..c2c6c7b --- /dev/null +++ b/odyseescraper/migrations/0013_alter_odyseerelease_tags.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.5 on 2025-01-24 22:15 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('odyseescraper', '0012_taggingrule_name'), + ] + + operations = [ + migrations.AlterField( + model_name='odyseerelease', + name='tags', + field=models.ManyToManyField(blank=True, help_text="A list of tags associated with this release. This should NOT contain extraneous tags from Odysee -- it's a data structure specific to this site.", related_name='releases', to='odyseescraper.tag'), + ), + ] diff --git a/odyseescraper/models.py b/odyseescraper/models.py index 6fd6992..4e2bb80 100644 --- a/odyseescraper/models.py +++ b/odyseescraper/models.py @@ -53,7 +53,7 @@ class OdyseeRelease(models.Model): thumbnail = models.URLField(max_length=512, help_text="The URL to the Odysee-hosted thumbnail of the release") filehash = models.CharField(max_length=512, help_text="The hash of the file of the claim") - tags = models.ManyToManyField(Tag, related_name="releases", help_text="A list of tags associated with this release. This should NOT contain extraneous tags from Odysee -- it's a data structure specific to this site.") + tags = models.ManyToManyField(Tag, related_name="releases", blank=True, help_text="A list of tags associated with this release. This should NOT contain extraneous tags from Odysee -- it's a data structure specific to this site.") def __str__(self): return self.name