mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed SQLAlchemy operation error with the boolean value as true/false for Python version < 3.7
This commit is contained in:
committed by
Akshay Joshi
parent
656e239e55
commit
228d4bb321
@@ -162,13 +162,13 @@ def update_macro(data, macro):
|
||||
:param macro: macro
|
||||
"""
|
||||
|
||||
name = getattr(data, 'name', None)
|
||||
sql = getattr(data, 'sql', None)
|
||||
name = data.get('name', None)
|
||||
sql = data.get('sql', None)
|
||||
|
||||
if name or sql and macro.sql and name is None:
|
||||
if name or sql and macro.sql and 'name' in data and name is None:
|
||||
return False, gettext(
|
||||
"Could not find the required parameter (name).")
|
||||
elif name or sql and macro.name and sql is None:
|
||||
elif name or sql and macro.name and 'sql' in data and sql is None:
|
||||
return False, gettext(
|
||||
"Could not find the required parameter (sql).")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user