API: fix writing old permissions on teams (#6489)

This commit is contained in:
Richard Schreiber
2026-08-25 09:38:11 +02:00
committed by GitHub
parent 6d4aba6e3d
commit dbd971cc22
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -426,6 +426,8 @@ class TeamSerializer(serializers.ModelSerializer):
for k, v in OLD_TO_NEW_ORGANIZER_MIGRATION.items():
if full_data.get(k) is True:
data["limit_organizer_permissions"].update({kk: True for kk in v})
for key in list(k for k in data if k.startswith("can_")):
del data[key]
if full_data.get('limit_events') and full_data.get('all_events'):
raise ValidationError('Do not set both limit_events and all_events.')