fix: ClubRole migration

This commit is contained in:
imperosol
2026-05-21 22:50:56 +02:00
parent 59b4c4e73c
commit a10773bb37
@@ -33,7 +33,7 @@ def migrate_roles(apps: StateApps, schema_editor):
club_id=club_id, club_id=club_id,
order=max(SITH_CLUB_ROLES) - role, order=max(SITH_CLUB_ROLES) - role,
) )
updates.append(When(role=role, then=new_role.id)) updates.append(When(club_id=club_id, role=role, then=new_role.id))
# all updates must happen at the same time # all updates must happen at the same time
# otherwise, the 10 first created ClubRole would be # otherwise, the 10 first created ClubRole would be
# re-modified after their initial creation, and it would # re-modified after their initial creation, and it would