Skip to content

Commit 8e84b33

Browse files
committed
Merge branch '195_url_db_fix' into 'master'
Fix the instantiation of the url_database attribute on the molecular formula search settings Closes #195 See merge request mass-spectrometry/corems!151
2 parents 47d5a17 + 7bb3d25 commit 8e84b33

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

corems/encapsulation/factory/processingSetting.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,9 +927,10 @@ class MolecularFormulaSearchSettings:
927927
used_atom_valences: dict = dataclasses.field(default_factory=dict)
928928

929929
def __post_init__(self):
930-
self.url_database = os.getenv(
930+
if not self.url_database or self.url_database == "":
931+
self.url_database = os.getenv(
931932
"COREMS_DATABASE_URL", "sqlite:///db/molformula.db"
932-
)
933+
)
933934
# enforce datatype
934935
for field in dataclasses.fields(self):
935936
value = getattr(self, field.name)

0 commit comments

Comments
 (0)