From ee80d0268c3bf35fa352e3748cc326ef11d2e5dc Mon Sep 17 00:00:00 2001 From: csae8092 Date: Tue, 19 Dec 2023 07:24:40 +0100 Subject: [PATCH] more lower case things #11 --- .env | 7 +++---- apis_core/apis_metainfo/models.py | 8 ++++---- set_env_variables.sh | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.env b/.env index b5a9e83..a04f360 100644 --- a/.env +++ b/.env @@ -1,5 +1,4 @@ POSTGRES_DB=pmb -POSTGRES_USER=pmb -POSTGRES_PASSWORD=pmb -POSTGRES_HOST=172.17.0.1 -DEBUG=True \ No newline at end of file +# POSTGRES_HOST=172.17.0.1 +DEBUG=True +POSTGRES_HOST=127.0.0.1 \ No newline at end of file diff --git a/apis_core/apis_metainfo/models.py b/apis_core/apis_metainfo/models.py index ee0ec5c..2ab391e 100644 --- a/apis_core/apis_metainfo/models.py +++ b/apis_core/apis_metainfo/models.py @@ -262,15 +262,15 @@ def merge_with(self, entities): for r in rels.filter(model__icontains=e_b): lst_ents_rel = str(r).split() if lst_ents_rel[-1] == lst_ents_rel[-2]: - q_d = {"related_{}A".format(e_b.lower()): ent} + q_d = {"related_{}a".format(e_b.lower()): ent} k = r.model_class().objects.filter(**q_d) for t in k: - setattr(t, "related_{}A".format(e_a.lower()), self) + setattr(t, "related_{}a".format(e_a.lower()), self) t.save() - q_d = {"related_{}B".format(e_b.lower()): ent} + q_d = {"related_{}b".format(e_b.lower()): ent} k = r.model_class().objects.filter(**q_d) for t in k: - setattr(t, "related_{}B".format(e_a.lower()), self) + setattr(t, "related_{}b".format(e_a.lower()), self) t.save() else: q_d = {"related_{}".format(e_b.lower()): ent} diff --git a/set_env_variables.sh b/set_env_variables.sh index 77758e8..e0a3156 100644 --- a/set_env_variables.sh +++ b/set_env_variables.sh @@ -1 +1 @@ -export $(grep -v '^#' .secret | xargs) \ No newline at end of file +export $(grep -v '^#' .env | xargs) \ No newline at end of file