mirror of
https://github.com/ae-utbm/sith.git
synced 2026-03-22 11:35:06 +00:00
remove settings.SITH_MAXIMUM_FREE_ROLE
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# Generated by Django 5.2.3 on 2025-06-21 21:59
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
from django.db.migrations.state import StateApps
|
||||
from django.db.models import Case, When
|
||||
|
||||
PRESIDENT_ROLE = 10
|
||||
MAXIMUM_FREE_ROLE = 1
|
||||
SITH_CLUB_ROLES = {
|
||||
10: "Président⸱e",
|
||||
9: "Vice-Président⸱e",
|
||||
@@ -28,7 +28,7 @@ def migrate_roles(apps: StateApps, schema_editor):
|
||||
for club_id, role in Membership.objects.values_list("club", "role").distinct():
|
||||
new_role = ClubRole.objects.create(
|
||||
name=SITH_CLUB_ROLES[role],
|
||||
is_board=role > settings.SITH_MAXIMUM_FREE_ROLE,
|
||||
is_board=role > MAXIMUM_FREE_ROLE,
|
||||
is_presidency=role == PRESIDENT_ROLE,
|
||||
club_id=club_id,
|
||||
order=PRESIDENT_ROLE - role,
|
||||
|
||||
Reference in New Issue
Block a user