Commit f4f47a4e authored by Arkadiusz Hiler's avatar Arkadiusz Hiler

Remove related_name from Series.submitter

class Series:
    submitter = models.ForeignKey(Person, ...

Would result in Person having a field named series_set QuerySet that
represents the other side of this one-to-many relation.

related_name is used to overwrite that and it looks like it purpose was
misunderstood as it had been set to "submitters" - Person.submitters
doesn't make much sense.

Let's remove related_name an use the default name.
Signed-off-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent 8aebdaf7
# Generated by Django 2.2.14 on 2020-07-15 00:47
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('patchwork', '0035_test_is_markdown'),
]
operations = [
migrations.AlterField(
model_name='series',
name='submitter',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='patchwork.Person'),
),
]
......@@ -505,8 +505,7 @@ class TestState:
class Series(models.Model):
project = models.ForeignKey(Project, on_delete=models.CASCADE)
name = models.CharField(max_length=200, default=SERIES_DEFAULT_NAME)
submitter = models.ForeignKey(Person, related_name='submitters',
on_delete=models.CASCADE)
submitter = models.ForeignKey(Person, on_delete=models.CASCADE)
reviewer = models.ForeignKey(User, related_name='reviewers', null=True,
blank=True, on_delete=models.CASCADE)
submitted = models.DateTimeField(default=datetime.datetime.now)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment