Skip to content

Commit

Permalink
Fix "null has no effect on ManyToManyField" warning on tests
Browse files Browse the repository at this point in the history
Also rename the migration that adds the advert-publications relation to something more meaningful
  • Loading branch information
gasman committed Dec 12, 2024
1 parent 4db4263 commit c5674b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='advert',
name='publications',
field=models.ManyToManyField(blank=True, null=True, to='tests.Publication'),
field=models.ManyToManyField(blank=True, to='tests.Publication'),
),
]
2 changes: 1 addition & 1 deletion tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Advert(AirtableMixin, models.Model):
long_description = RichTextField(blank=True, null=True)
points = models.IntegerField(null=True, blank=True)
slug = models.SlugField(max_length=100, unique=True, editable=True)
publications = models.ManyToManyField(Publication, null=True, blank=True)
publications = models.ManyToManyField(Publication, blank=True)

@classmethod
def map_import_fields(cls):
Expand Down

0 comments on commit c5674b8

Please sign in to comment.