diff --git a/hydws/crud.py b/hydws/crud.py index fcc40bcb8e7fac28b410f0ce6c980dda1e9b6394..02f48b1487a4ca991a3f9934a67dfdad7f913f34 100644 --- a/hydws/crud.py +++ b/hydws/crud.py @@ -200,6 +200,7 @@ async def create_hydraulics(hydraulics: List[dict], datetime.strftime(start, '%Y-%m-%d'), datetime.strftime(end + timedelta(days=1), '%Y-%m-%d')) await db.execute(text(statement)) + await db.commit() # I have no idea why this is needed, but it is!!!! # check whether there are already samples in the database for that time count = await db.scalar(