Skip to content

Commit

Permalink
address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
evemartin committed Jul 31, 2024
1 parent f81e6cd commit c5c1d9c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cfl_common/common/migrations/0053_clean_class_data.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from django.apps.registry import Apps
from django.db import migrations, models

def clean_dirty_data(apps: Apps, *args):
def clean_early_class_data(apps: Apps, *args):
Class = apps.get_model("common", "Class")

Class.objects.filter(
creation_time__year=2015
creation_time__date__gt = datetime.date(2021, 10, 15)
).update(creation_time = None)

class Migration(migrations.Migration):
Expand All @@ -16,7 +16,7 @@ class Migration(migrations.Migration):

operations = [
migrations.RunPython(
code=clean_dirty_data,
code=clean_early_class_data,
reverse_code=migrations.RunPython.noop,
),
]

0 comments on commit c5c1d9c

Please sign in to comment.