diff --git a/odyseescraper/migrations/0015_alter_taggingrule_tag.py b/odyseescraper/migrations/0015_alter_taggingrule_tag.py new file mode 100644 index 0000000..5035185 --- /dev/null +++ b/odyseescraper/migrations/0015_alter_taggingrule_tag.py @@ -0,0 +1,19 @@ +# Generated by Django 5.1.5 on 2025-01-24 22:38 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('odyseescraper', '0014_alter_tag_name'), + ] + + operations = [ + migrations.AlterField( + model_name='taggingrule', + name='tag', + field=models.ForeignKey(help_text='The tag to assign a release with', on_delete=django.db.models.deletion.CASCADE, related_name='targettag', to='odyseescraper.tag'), + ), + ] diff --git a/odyseescraper/models.py b/odyseescraper/models.py index cf4681a..76f0ace 100644 --- a/odyseescraper/models.py +++ b/odyseescraper/models.py @@ -21,7 +21,7 @@ class TaggingRule(models.Model): name = models.CharField(max_length=1024, help_text="A non-user-facing name for the rule") title_regex = models.CharField(max_length=512, blank=True, help_text="A regular expression to match against the title of a release. If the release's title matches, the tag is applied. If this value is blank, it is ignored.") description_regex = models.CharField(max_length=512, blank=True, help_text="A regular expression to match against the description of a release. If it matches, the tag is applied. If this value is blank, it iss ignored.") - tag = models.ForeignKey(Tag, on_delete=models.CASCADE, db_index=True, help_text="The tag to assign a release with") + tag = models.ForeignKey(Tag, related_name="targettag", on_delete=models.CASCADE, db_index=True, help_text="The tag to assign a release with") def __str__(self): return str(self.name)