fix: Move report_cheater to flags to avoid circular import

This commit is contained in:
2025-11-07 14:14:54 +01:00
parent 3139c08c91
commit cfcbda732d
2 changed files with 9 additions and 8 deletions

View File

@@ -1,7 +1,14 @@
from CTFd.plugins.flags import BaseFlag
from CTFd.utils.user import get_current_user
from CTFd.models import db
from .models import CheaterTeams
from . import report_cheater
def report_cheater(challenge_id: int, cheater_id: int, helper_id: int, flag_id: int):
cheater = CheaterTeams(challenge_id, cheater_id, helper_id, flag_id)
db.session.add(cheater)
db.session.commit()
class PersonalFlag(BaseFlag):