From a0f0ad7cbf432a3e64154b9d83b81b3e2563f685 Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 10 Oct 2023 21:14:45 +0300 Subject: [PATCH] rename hw-grinch to hallowgrinch --- files/helpers/config/awards.py | 4 ++-- files/routes/awards.py | 2 +- migrations/20231010-rename-hw-grinch.sql | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 migrations/20231010-rename-hw-grinch.sql diff --git a/files/helpers/config/awards.py b/files/helpers/config/awards.py index 4e99625d2..36b757481 100644 --- a/files/helpers/config/awards.py +++ b/files/helpers/config/awards.py @@ -355,8 +355,8 @@ AWARDS = { "enabled": IS_HOMOWEEN(), "positive": True, }, - "hw-grinch": { - "kind": "hw-grinch", + "hallowgrinch": { + "kind": "hallowgrinch", "title": "Hallowgrinch", "description": "???", "icon": "fas fa-angry", diff --git a/files/routes/awards.py b/files/routes/awards.py index 85ab0b0da..b82d7bd51 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -548,7 +548,7 @@ def award_thing(v, thing_type, id): if v.id == author.id: session['event_music'] = False elif IS_HOMOWEEN(): - if kind == "hw-grinch": + if kind == "hallowgrinch": badge_grant(badge_id=185, user=author) if v.id == author.id: session['event_music'] = False diff --git a/migrations/20231010-rename-hw-grinch.sql b/migrations/20231010-rename-hw-grinch.sql new file mode 100644 index 000000000..94b8dd116 --- /dev/null +++ b/migrations/20231010-rename-hw-grinch.sql @@ -0,0 +1 @@ +update award_relationships set kind='hallowgrinch' where kind='hw-grinch';