Skip to content

Commit

Permalink
updated database creation to make sure config is correct
Browse files Browse the repository at this point in the history
  • Loading branch information
panosatha committed Nov 10, 2024
1 parent 191c1e0 commit 46a8961
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion flood_adapt/database_builder/create_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from flood_adapt.api.projections import create_projection, save_projection
from flood_adapt.api.static import read_database
from flood_adapt.api.strategies import create_strategy, save_strategy
from flood_adapt.config import Settings
from flood_adapt.log import FloodAdaptLogging
from flood_adapt.object_model.interface.site import Obs_pointModel, SlrModel
from flood_adapt.object_model.io.unitfulvalue import UnitfulDischarge, UnitfulLength
Expand Down Expand Up @@ -389,7 +390,11 @@ def create_standard_objects(self):
physical and socio-economic conditions, and saves them to the database.
"""
# Load database
read_database(self.root.parent, self.config.name)
Settings(
database_root=self.root.parent,
database_name=self.config.name,
)
read_database(Settings().database_root, Settings().database_name)
# Create no measures strategy
strategy = create_strategy({"name": "no_measures", "measures": []})
save_strategy(strategy)
Expand Down

0 comments on commit 46a8961

Please sign in to comment.