From c232c6d91a420203ee0b4ad9185a99e9a8bddf50 Mon Sep 17 00:00:00 2001 From: vingerha <44190435+vingerha@users.noreply.github.com> Date: Thu, 29 Dec 2022 07:14:10 +0100 Subject: [PATCH] Bug fix and new pronotepy release --- app/database.py | 6 +++--- app/requirement.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/database.py b/app/database.py index ac0e3f3..df41cb8 100644 --- a/app/database.py +++ b/app/database.py @@ -203,10 +203,10 @@ def init(self,p2mVersion,dbVersion): , reasons TEXT , circumstances TEXT , nature TEXT - , duration + , duration TEXT , homework TEXT , exclusion TEXT - , PRIMARY KEY(studentname,pid,punid))''') + , PRIMARY KEY(studentname,period_name,period_start,pundate,reasons))''') # Commit self.commit() @@ -443,7 +443,7 @@ def _loadAbsenceShortList(self,student): # not collecting all datestart = datetime.date.today() - relativedelta(days=30) datestart = datestart.strftime("%Y/%m/%d %H:%M") - query = f"SELECT * FROM absences WHERE studentname like '{studentname}' and from_date >= '{datestart}' and period_name like 'Année continue'" + query = f"SELECT * FROM absences WHERE studentname like '{studentname}' and from_date >= '{datestart}' and period_name like 'Année continue' order by from_date DESC" self.cur.execute(query) queryResult = self.cur.fetchall() # Create object Absence diff --git a/app/requirement.txt b/app/requirement.txt index da820a5..5472cc9 100644 --- a/app/requirement.txt +++ b/app/requirement.txt @@ -5,5 +5,5 @@ envparse schedule paho-mqtt pycron -pronotepy==2.7.0 +pronotepy==2.8.0 unidecode