Skip to content

Commit

Permalink
SetDB method deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
kuczynskimaciej1 committed Jun 3, 2024
1 parent 5fe08d3 commit 20526a8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions Interface/AppUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ def setSender(self, new_sender: ISender):
def setUser(self, current_user: User):
self.user = current_user

def setDb(self, new_db):
#AppUI.db = new_db
IModel.db = new_db

def add_periodic_task(self, period: int, func: Callable):
# TODO można poprawić żeby się odpalało tylko przy dodaniu obiektu,
# przemyśleć
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def on_closing():
if __name__ == "__main__":
db = DatabaseHandler(dbURL, tables)
GroupController.setDbHandler(db)
IModel.db = db

if db.checkIntegrity():
print("Database intact, proceeding.")
Expand All @@ -41,7 +42,6 @@ def on_closing():

ui = AppUI()
ui.prepareInterface()
ui.setDb(db)


if (mocking_enabled):
Expand Down

0 comments on commit 20526a8

Please sign in to comment.