Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
haneslinger committed Jan 4, 2024
1 parent a7cc61b commit 645634b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions seed/migrations/0212_move_filtergroup_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from django.db import migrations


def move_filter_groups(apps, schema_editor):
FilterGroup = apps.get_model('seed', 'FilterGroup')
for filter_group in FilterGroup.objects.all():
Expand All @@ -12,6 +13,7 @@ def move_filter_groups(apps, schema_editor):
elif filter_group.labels.exists() and filter_group.label_logic == 2: # exclude
filter_group.exclude_labels.set(filter_group.labels.all())


def move_filter_groups_back(apps, schema_editor):
# if the filter group only has one set of labels, we can move those back
FilterGroup = apps.get_model('seed', 'FilterGroup')
Expand All @@ -29,6 +31,7 @@ def move_filter_groups_back(apps, schema_editor):
filter_group.label_logic = 2
filter_group.save()


class Migration(migrations.Migration):

dependencies = [
Expand Down

0 comments on commit 645634b

Please sign in to comment.