config test
This commit is contained in:
parent
f960614be7
commit
82cbae8f74
@ -84,7 +84,10 @@ class Stats:
|
|||||||
|
|
||||||
def parse(self):
|
def parse(self):
|
||||||
tot_part_start = tot_part_end = 0
|
tot_part_start = tot_part_end = 0
|
||||||
|
try:
|
||||||
tot_part_start = self.db.dbQuery(f"""SELECT value_field FROM {dbName} WHERE timestamp = {self.startDate} AND key_field = 'total_participants'""")[-1][0]
|
tot_part_start = self.db.dbQuery(f"""SELECT value_field FROM {dbName} WHERE timestamp = {self.startDate} AND key_field = 'total_participants'""")[-1][0]
|
||||||
|
except IndexError:
|
||||||
|
tot_part_start = 0
|
||||||
tot_part_end = self.db.dbQuery(f"""SELECT value_field FROM {dbName} WHERE timestamp > {self.startDate} AND timestamp < {self.endDate} AND key_field = 'total_participants'""")
|
tot_part_end = self.db.dbQuery(f"""SELECT value_field FROM {dbName} WHERE timestamp > {self.startDate} AND timestamp < {self.endDate} AND key_field = 'total_participants'""")
|
||||||
max_tot = []
|
max_tot = []
|
||||||
for mx in tot_part_end:
|
for mx in tot_part_end:
|
||||||
|
Loading…
Reference in New Issue
Block a user