Add missing variable. Fix syntax.

This commit is contained in:
yohan 2024-06-01 23:42:54 +02:00
parent 258a2d337c
commit 9b33654fe6
2 changed files with 2 additions and 1 deletions

View File

@ -9,4 +9,5 @@ WORKDIR /root
COPY thermostat.py /root/
COPY migrate_db.sh /root/
COPY entrypoint.sh /root/
ENV FLASK_APP thermostat.py
ENTRYPOINT ["/root/entrypoint.sh"]

View File

@ -76,7 +76,7 @@ class Set_mode(db.Model):
__tablename__ = "set_mode"
name = db.Column(db.String, primary_key=True, server_default='mode', nullable=False)
value = db.Column(db.String, nullable=False)
timestamp = db.Column(db.DateTime, server_default=text("CURRENT_TIMESTAMP"), nullable=False)
timestamp = db.Column(db.DateTime, server_default=db.text("CURRENT_TIMESTAMP"), nullable=False)
Set_mode_resource_fields = {
'name': fields.String(description='mode type'),