Skip to content

Commit

Permalink
chores(projectOwnership): add migration to remove old task name (#5515)
Browse files Browse the repository at this point in the history
### 📣 Summary
Added a migration to clean up outdated task names related to project
ownership transfers.
  • Loading branch information
noliveleger authored Feb 12, 2025
1 parent f7dcd0b commit e7edcff
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions kobo/apps/project_ownership/migrations/0003_remove_old_task.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 4.2.15 on 2025-02-12 10:13

from django.db import migrations


def remove_old_task(apps, schema_editor):

PeriodicTask = apps.get_model('django_celery_beat', 'PeriodicTask') # noqa
PeriodicTask.objects.filter(
task='kobo.apps.project_ownership.tasks.task_rescheduler'
).delete()


class Migration(migrations.Migration):

dependencies = [
(
'project_ownership',
'0002_alter_invite_date_created_alter_invite_date_modified_and_more',
),
]

operations = [
migrations.RunPython(remove_old_task, migrations.RunPython.noop),
]

0 comments on commit e7edcff

Please sign in to comment.