Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all teams when migrating user mode #2539

Merged
merged 5 commits into from
May 15, 2024

Conversation

MilyMilo
Copy link
Member

Resolves #2522

Currently, as Submissions are bound to both users and their teams, after switching from team mode to user mode, in certain cases where a former team member has solved the challenge before, the user who is now an individual will not be able to solve the challenge.

This PR addresses this with removing all Teams, and user.team relations if the change in config is being made from team mode to user mode. I think this makes for a consistent behavior, and only removing the relations would result in a bunch of empty teams, should team mode ever be restored by the competition administrators.

Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.88%. Comparing base (162bca6) to head (592d1b0).
Report is 6 commits behind head on master.

❗ Current head 592d1b0 differs from pull request most recent head 793fff9. Consider uploading reports for the commit 793fff9 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2539      +/-   ##
==========================================
+ Coverage   87.57%   87.88%   +0.30%     
==========================================
  Files         155      155              
  Lines        9650     9655       +5     
==========================================
+ Hits         8451     8485      +34     
+ Misses       1199     1170      -29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ColdHeat ColdHeat merged commit 41bf925 into CTFd:master May 15, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Users cant solve challenge after changing to user mode
2 participants