Merge pull request #41 from puls200/hotfix/20240827

potentially resolving the 'Unknown column ... in 'field list' issue
This commit is contained in:
Daniel Schick 2024-08-29 07:34:24 +02:00 committed by GitHub
commit e890985e2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,6 +2,7 @@ import json
import logging import logging
import traceback import traceback
import pydapper import pydapper
from enum import Enum, Flag
from ..schemas import model from ..schemas import model
from .. import local_db from .. import local_db
@ -83,7 +84,7 @@ def PostTimes(schemaModel):
query += "?" + key + "?" query += "?" + key + "?"
query += ")" query += ")"
logging.error(f"(/impl/times @86 issue:) query: {query}, schemaModel: {schemaModel}") schemaModel = {k:v.value if isinstance(v, (Enum, Flag)) else v for k,v in schemaModel.items()}
commands.execute(query, schemaModel) commands.execute(query, schemaModel)
new_id = commands.execute_scalar("select last_insert_id()") new_id = commands.execute_scalar("select last_insert_id()")
@ -139,6 +140,7 @@ def PutTimes(schemaModel):
query += "WHERE id = ?id?" query += "WHERE id = ?id?"
schemaModel = {k:v.value if isinstance(v, (Enum, Flag)) else v for k,v in schemaModel.items()}
affected_rows = commands.execute(query, param=schemaModel) affected_rows = commands.execute(query, param=schemaModel)
# apply 'Traffic Light' evaluation to obtain 'GREEN', 'YELLOW' or 'RED' evaluation state. The function internally updates the mysql database 'shipcall' # apply 'Traffic Light' evaluation to obtain 'GREEN', 'YELLOW' or 'RED' evaluation state. The function internally updates the mysql database 'shipcall'