From 11ed27d05f4a875a75dc2d0c3b227772d38bb1e0 Mon Sep 17 00:00:00 2001 From: Ronaldo Faria Lima Date: Sat, 9 Aug 2025 10:36:41 -0300 Subject: [PATCH] Made migration 19 undoable. --- helpdesk/migrations/0019_ticket_secret_key.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/helpdesk/migrations/0019_ticket_secret_key.py b/helpdesk/migrations/0019_ticket_secret_key.py index 5e59de9a..365bab22 100644 --- a/helpdesk/migrations/0019_ticket_secret_key.py +++ b/helpdesk/migrations/0019_ticket_secret_key.py @@ -12,6 +12,13 @@ def clear_secret_keys(apps, schema_editor): ticket.save() +def no_op(apps, schema_editor): + """ + This is added only to make migrations reversible. + """ + pass + + class Migration(migrations.Migration): dependencies = [ ("helpdesk", "0018_ticket_secret_key"), @@ -27,5 +34,5 @@ class Migration(migrations.Migration): verbose_name="Secret key needed for viewing/editing ticket by non-logged in users", ), ), - migrations.RunPython(clear_secret_keys), + migrations.RunPython(clear_secret_keys, reverse_code=no_op), ]