Skip to content

Commit e9df1db

Browse files
committed
fix(load): lowercase all group access ids
1 parent 9ba876f commit e9df1db

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • cds_migrator_kit/rdm/records/load

cds_migrator_kit/rdm/records/load/load.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ def _normalize_group_name(subject):
284284
subject, permission = next(iter(grant_info.items()))
285285
permission = permission or default_permission
286286
grants_with_perms[subject] = permission
287+
subject = subject.lower()
287288

288289
if email_pattern.match(subject):
289290
emails.add(subject)
@@ -313,12 +314,12 @@ def _create_grant(subject_type, subject_id, permission):
313314
)
314315

315316
is_local_dev = current_app.config.get("CDS_MIGRATOR_KIT_ENV") == "local"
316-
317-
if (
318-
not is_local_dev
319-
and not current_rdm_records_service.access._validate_grant_subject(
317+
is_valid = current_rdm_records_service.access._validate_grant_subject(
320318
identity, grant
321319
)
320+
if (
321+
not is_local_dev
322+
and not is_valid
322323
):
323324
raise ManualImportRequired(
324325
message="Verification of access subject failed (likely not existing entry)",

0 commit comments

Comments
 (0)