Skip to content

Commit

Permalink
dont approve quests with kudos rewards that arent owned by gitcoin
Browse files Browse the repository at this point in the history
  • Loading branch information
owocki committed Oct 23, 2019
1 parent 1643b6a commit c9db461
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/quests/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c9db461

Please sign in to comment.