From c9db4616b34d208c0f7d22cbd4b2e13050e0b164 Mon Sep 17 00:00:00 2001 From: Owocki Date: Wed, 23 Oct 2019 08:24:28 -0600 Subject: [PATCH] dont approve quests with kudos rewards that arent owned by gitcoin --- app/quests/admin.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/quests/admin.py b/app/quests/admin.py index 1ac05985442..9e7ed878769 100644 --- a/app/quests/admin.py +++ b/app/quests/admin.py @@ -17,6 +17,12 @@ def response_change(self, request, obj): from quests.helpers import record_quest_activity, record_award_helper from quests.models import QuestAttempt from marketing.mails import new_quest_approved + from django.conf import settings + + if obj.kudos_reward.owner_address.lower() != settings.KUDOS_OWNER_ACCOUNT.lower(): + self.message_user(request, f"Cannot approve quest. The owner address is not the Gitcoin Airdropper") + return super().response_change(request, obj) + quest = obj qa = QuestAttempt.objects.create( quest=obj,