From 0a9c83682233b237d438972c42ad4a6b5aebb84b Mon Sep 17 00:00:00 2001 From: Michele-Alberti <62114934+Michele-Alberti@users.noreply.github.com> Date: Fri, 1 Mar 2024 18:30:47 +0100 Subject: [PATCH 1/2] build(makefile): fix missing env variable in docker-run rule --- makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 38a837a..5070632 100755 --- a/makefile +++ b/makefile @@ -174,7 +174,8 @@ docker-run: check-version -e DATA_LUNCH_OAUTH_ENC_KEY=${DATA_LUNCH_OAUTH_ENC_KEY} \ -e DATA_LUNCH_OAUTH_KEY=${DATA_LUNCH_OAUTH_KEY} \ -e DATA_LUNCH_OAUTH_SECRET=${DATA_LUNCH_OAUTH_SECRET} \ - -e DATA_LUNCH_OAUTH_SECRET=${DATA_LUNCH_OAUTH_REDIRECT_URI} \ + -e DATA_LUNCH_OAUTH_REDIRECT_URI=${DATA_LUNCH_OAUTH_REDIRECT_URI} \ + -e DATA_LUNCH_DB_PASSWORD=${DATA_LUNCH_DB_PASSWORD} \ ${IMAGEFULLNAME} ${PANEL_ARGS} @echo -e "${GREEN}done${NC}" From c97eab04305d8e710a161c56a340af6394c1e1f3 Mon Sep 17 00:00:00 2001 From: Michele-Alberti <62114934+Michele-Alberti@users.noreply.github.com> Date: Fri, 1 Mar 2024 18:32:19 +0100 Subject: [PATCH 2/2] fix(models.py): fix error in server default for date in stats table now date is assigned database-side --- dlunch/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlunch/models.py b/dlunch/models.py index 195546b..0595f61 100755 --- a/dlunch/models.py +++ b/dlunch/models.py @@ -318,8 +318,7 @@ class Stats(Data): date = Column( Date, nullable=False, - default=datetime.utcnow(), - server_default=func.current_timestamp(), + server_default=func.current_date(), ) guest = Column( String(20),