Skip to content

Commit

Permalink
fix: permit destroy in all case
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoFgrx committed Dec 23, 2024
1 parent 591499c commit d86c554
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def attempt(cls, challenge, request):

msg = "Correct"

if challenge.destroy_on_flag and sourceId != 0: # do not destroy a global instance
if challenge.destroy_on_flag:
logger.info("destroy the instance")
try:
delete_instance(challenge.id, sourceId)
Expand All @@ -377,7 +377,7 @@ def attempt(cls, challenge, request):

msg = "Correct"

if challenge.destroy_on_flag and sourceId != 0:
if challenge.destroy_on_flag:
logger.info("destroy the instance")
try:
delete_instance(challenge.id, sourceId)
Expand Down

0 comments on commit d86c554

Please sign in to comment.