From 113aa272b3e726c4fd32c87cbfc93436bc93894f Mon Sep 17 00:00:00 2001 From: Rick Date: Wed, 30 Jan 2019 23:34:30 +0100 Subject: [PATCH] Fixing previous commit (sql clause at wrong place) --- admidio.py | 3 +-- event.py | 3 ++- group.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/admidio.py b/admidio.py index 04ec02e..61be7d5 100644 --- a/admidio.py +++ b/admidio.py @@ -58,8 +58,7 @@ class Admidio: sql = f"""SELECT rol_id, rol_name, rol_description FROM {self.prefix}_roles WHERE rol_valid = 1 - AND rol_cat_id != {self.event_confirmation_id} - AND mem_end = 9999-12-31""" + AND rol_cat_id != {self.event_confirmation_id}""" self.cursor.execute(sql) for row in self.cursor.fetchall(): diff --git a/event.py b/event.py index 0624118..50de9cc 100644 --- a/event.py +++ b/event.py @@ -20,7 +20,8 @@ class Event(): sql = f"""SELECT mem_usr_id, mem_leader, mem_count_guests FROM {self.admidio.prefix}_members - WHERE mem_rol_id = {self.rol_id}""" + WHERE mem_rol_id = {self.rol_id} + AND mem_end = 9999-12-31""" self.__c.execute(sql) for row in self.__c.fetchall(): diff --git a/group.py b/group.py index 5989929..bbe4412 100644 --- a/group.py +++ b/group.py @@ -11,7 +11,8 @@ class Group: self.leaders = list() sql = f"""SELECT mem_usr_id, mem_leader FROM {self.admidio.prefix}_members - WHERE mem_rol_id = {self.id}""" + WHERE mem_rol_id = {self.id} + AND mem_end = 9999-12-31""" self.__c.execute(sql) for row in self.__c.fetchall():