From 285dd1bc9d2f5396095f2b5c269e381932d8331d Mon Sep 17 00:00:00 2001 From: AlexGacon Date: Wed, 7 Aug 2024 16:16:46 +0200 Subject: [PATCH] fix: the initial data path changes for geonode project --- charts/geonode/templates/_helpers.tpl | 8 ++++++++ .../geonode/templates/geonode/geonode-tasks-py-conf.yaml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/charts/geonode/templates/_helpers.tpl b/charts/geonode/templates/_helpers.tpl index d2d4908..f01961d 100644 --- a/charts/geonode/templates/_helpers.tpl +++ b/charts/geonode/templates/_helpers.tpl @@ -154,3 +154,11 @@ amqp://{{ .Values.rabbitmq.auth.username }}:{{ .Values.rabbitmq.auth.password }} {{- define "geonode_path" -}} /usr/src/{{ .Values.geonode.general.geonode_project }}/{{ .Values.geonode.general.geonode_project }} {{- end -}} + +{{- define "initial_data_path" -}} +{{- if (eq .Values.geonode.general.geonode_project "geonode") -}} +geonode/base/fixtures/initial_data.json +{{- else -}} +initial_data.json +{{- end -}} +{{- end -}} diff --git a/charts/geonode/templates/geonode/geonode-tasks-py-conf.yaml b/charts/geonode/templates/geonode/geonode-tasks-py-conf.yaml index 760ba45..d31cfa5 100644 --- a/charts/geonode/templates/geonode/geonode-tasks-py-conf.yaml +++ b/charts/geonode/templates/geonode/geonode-tasks-py-conf.yaml @@ -353,7 +353,7 @@ data: pty=True, ) ctx.run( - f"python manage.py loaddata geonode/base/fixtures/initial_data.json \ + f"python manage.py loaddata {{ include "initial_data_path" . }} \ --settings={_localsettings()}", pty=True, )