potentially resolving the 'Unknown column ... in 'field list' issue
This commit is contained in:
parent
a51b830cf6
commit
2ac2bc196c
@ -2,6 +2,7 @@ import json
|
||||
import logging
|
||||
import traceback
|
||||
import pydapper
|
||||
from enum import Enum, Flag
|
||||
|
||||
from ..schemas import model
|
||||
from .. import local_db
|
||||
@ -83,7 +84,7 @@ def PostTimes(schemaModel):
|
||||
query += "?" + key + "?"
|
||||
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)
|
||||
new_id = commands.execute_scalar("select last_insert_id()")
|
||||
|
||||
@ -139,6 +140,7 @@ def PutTimes(schemaModel):
|
||||
|
||||
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)
|
||||
|
||||
# apply 'Traffic Light' evaluation to obtain 'GREEN', 'YELLOW' or 'RED' evaluation state. The function internally updates the mysql database 'shipcall'
|
||||
|
||||
Reference in New Issue
Block a user