From ed1604b1ec61f5f6cad7b2fd8e08a463e9bc0c01 Mon Sep 17 00:00:00 2001 From: sandyr Date: Wed, 3 Jan 2024 15:59:02 +0000 Subject: [PATCH] allow ERA database to be non existent --- emgena/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emgena/models.py b/emgena/models.py index ad7e9b0aa..85beb7a48 100644 --- a/emgena/models.py +++ b/emgena/models.py @@ -200,7 +200,7 @@ class Meta(StudyAbstract.Meta): # the PUBLIC SYNONYM (according to ENA) and it's not working ATM # we were advised to prefix the views and this is the simplest way. # The short-term plan is to remove the dependency of ENA databases - _prefix_workaround = settings.DATABASES['era'].get('ERA_TABLESPACE_PREFIX', 'ERA\".\"') + _prefix_workaround = settings.DATABASES.get('era', {}).get('ERA_TABLESPACE_PREFIX', 'ERA\".\"') db_table = f'{_prefix_workaround}V_MGP_RUN_STUDY'