Фикс процедуры
This commit is contained in:
@@ -19,6 +19,8 @@ def procedure(db_config, name, args: tuple) -> list:
|
||||
raise ValueError("Cursor not created")
|
||||
else:
|
||||
cursor.callproc(name, args)
|
||||
result = cursor.fetchone()[0]
|
||||
return result
|
||||
|
||||
|
||||
def transaction(cursor, sql):
|
||||
|
||||
@@ -19,7 +19,7 @@ def check_report(input_data: dict) -> bool:
|
||||
db_config = current_app.config["db_config"]
|
||||
|
||||
result = procedure(db_config, "check_report", tuple(input_data.values()))
|
||||
if result is None or result["exist"] == 0:
|
||||
if result is None or result == 0:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user