diff --git a/charts/vs-registrar/files/init-db.sh b/charts/vs-registrar/files/init-db.sh index f20670cb8ed5a1fbf8565a1abadfce65a1cd738c..f6c89d08d85ab8014ce5de16ba23967b0b38f1dc 100644 --- a/charts/vs-registrar/files/init-db.sh +++ b/charts/vs-registrar/files/init-db.sh @@ -86,7 +86,7 @@ # Check if collection exits in database and initialize database only if not {{- if .Values.global.collections }} -if python3 manage.py id check {{ index (keys $.Values.global.collections) 0 | quote }}; then +if python3 manage.py id check {{ index (keys $.Values.global.collections | sortAlpha) 0 | quote }}; then echo "Initializing database" python3 manage.py coveragetype import /opt/core/rgbnir_definition.json --traceback diff --git a/charts/vs-renderer/files/init-db.sh b/charts/vs-renderer/files/init-db.sh index f20670cb8ed5a1fbf8565a1abadfce65a1cd738c..f6c89d08d85ab8014ce5de16ba23967b0b38f1dc 100644 --- a/charts/vs-renderer/files/init-db.sh +++ b/charts/vs-renderer/files/init-db.sh @@ -86,7 +86,7 @@ # Check if collection exits in database and initialize database only if not {{- if .Values.global.collections }} -if python3 manage.py id check {{ index (keys $.Values.global.collections) 0 | quote }}; then +if python3 manage.py id check {{ index (keys $.Values.global.collections | sortAlpha) 0 | quote }}; then echo "Initializing database" python3 manage.py coveragetype import /opt/core/rgbnir_definition.json --traceback