Skip to content

Introduce OuIdentifiers

Andreas Ellewsen requested to merge GREG-88-ou-identifiers into master

To facilitate multiple identifiers of OUs we introduce the OuIdentifier model and removed the orgreg_id field from OrganizationalUnit.

All current orgreg_ids are recreated as OuIdentifiers with name 'orgreg_id' and source 'orgreg'. Both values are configurable in the base settings file in the gregsite app. Note that changing this value after migration will require manual work changing all OuIdentifiers already created before the next run of the orgreg_import management command since that assumes all current orgreg identifiers uses these values.

All endpoints that previously exposed the orgreg_id field now exposes an identifiers field with a list of OuIdentifiers connected to that model with fields id, name, source, and value.

Resolves: GREG-88

Merge request reports

Loading