Clarify ambiguous FK relationship with tagging rules
This commit is contained in:
parent
44960d3792
commit
6d22b489ac
19
odyseescraper/migrations/0015_alter_taggingrule_tag.py
Normal file
19
odyseescraper/migrations/0015_alter_taggingrule_tag.py
Normal file
@ -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'),
|
||||||
|
),
|
||||||
|
]
|
@ -21,7 +21,7 @@ class TaggingRule(models.Model):
|
|||||||
name = models.CharField(max_length=1024, help_text="A non-user-facing name for the rule")
|
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.")
|
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.")
|
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):
|
def __str__(self):
|
||||||
return str(self.name)
|
return str(self.name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user