diff --git a/admidio.py b/admidio.py index 6596e18..b03c3db 100644 --- a/admidio.py +++ b/admidio.py @@ -62,7 +62,7 @@ class Admidio: self.cursor.execute(sql) for row in self.cursor.fetchall(): - self.groups[row[0]] = group.Group(self.db, row[0], row[1], self) + self.groups[row[0]] = group.Group(row[0], row[1], self) def initEvents(self): """Initialises all comming events and passed events <3 months""" diff --git a/group.py b/group.py index b623eb6..17bdd06 100644 --- a/group.py +++ b/group.py @@ -2,8 +2,8 @@ from admidio_python_api.exceptions import MemberNotFoundException class Group: - def __init__(self, db, group_id, name, admidio): - self.__c = db.cursor() + def __init__(self, group_id, name, admidio): + self.__c = admidio.db.cursor() self.id = group_id self.name = name self.admidio = admidio