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

fix: non school teachers cannot be admins #2395

Merged
merged 3 commits into from
Jan 15, 2025
Merged

Conversation

SKairinos
Copy link
Collaborator

@SKairinos SKairinos commented Jan 13, 2025

This change is Reviewable

Copy link
Contributor

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @SKairinos)


cfl_common/common/migrations/0056_set_non_school_teachers_as_non_admins.py line 9 at r1 (raw file):

    Teacher.objects.filter(
        new_user__is_active=True,

Do we need to update the inactive users too? Will the DB complain if there are any models that don't follow the constraint?

Copy link
Collaborator Author

@SKairinos SKairinos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @faucomte97)


cfl_common/common/migrations/0056_set_non_school_teachers_as_non_admins.py line 9 at r1 (raw file):

Previously, faucomte97 (Florian Aucomte) wrote…

Do we need to update the inactive users too? Will the DB complain if there are any models that don't follow the constraint?

Done. good point

Copy link
Contributor

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @SKairinos)

@SKairinos SKairinos enabled auto-merge (squash) January 15, 2025 10:15
@SKairinos SKairinos merged commit 9fea03f into master Jan 15, 2025
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.

teacher - refactor /onboarding
2 participants