2021.4 #19

Merged
edraft merged 237 commits from 2021.4 into master 2021-04-01 10:13:33 +02:00
2 changed files with 9 additions and 0 deletions
Showing only changes of commit 0cdecd893a - Show all commits

View File

@ -30,6 +30,9 @@ class DatabaseContext(DatabaseContextABC):
self._db.connect(connection_string)
self._create_tables()
def save_changes(self):
self._db.session.commit()
def _create_tables(self):
try:
for subclass in DatabaseModel.__subclasses__():

View File

@ -27,6 +27,12 @@ class DatabaseContextABC(ABC):
"""
pass
def save_changes(self):
"""
Saves changes of the database
"""
pass
@abstractmethod
def _create_tables(self):
"""