JiscSD / archivematica

Free and open-source digital preservation system designed to maintain standards-based, long-term access to collections of digital objects.
http://www.archivematica.org
GNU Affero General Public License v3.0
0 stars 0 forks source link

dashboard: make create_super_user idempotent in installer steps #46

Closed lower29 closed 6 years ago

lower29 commented 6 years ago

This fixes issue #45.

If a user already exists with the same name as the given user then the create_super_user function in steps.py would fail because the user already exists. This change makes the method idempotent, so that any existing user will be ignored and not cause an error.

I've tested this on my local environment and re-running the installer (using make all in the compose directory) no longer gives an error and allows the process to complete.

This was discovered whilst investigating https://github.com/JiscRDSS/rdss-archivematica/issues/118.