Skip to content

Commit a03e393

Browse files
RotheemMalem38
andauthored
Fix email migration (#809)
### Description Please explain the changes you made here. ### Checklist - [ ] Created tests which fail without the change (if possible) - [ ] All tests passing - [ ] Extended the documentation, if necessary Co-authored-by: Maxime Lemonnier <[email protected]>
1 parent 1d60f75 commit a03e393

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/core/users/endpoints_users.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,10 @@ async def migrate_mail(
704704
email=mail_migration.new_email,
705705
db=db,
706706
)
707-
if user.school_id is not SchoolType.no_school and user.school_id != new_school_id:
707+
if (
708+
user.school_id is not SchoolType.no_school.value
709+
and user.school_id != new_school_id
710+
):
708711
raise HTTPException(
709712
status_code=400,
710713
detail="New email address is not compatible with the current school",

0 commit comments

Comments
 (0)