mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where an illegal argument is showing for trigger SQL when a trigger is created for View. Fixes #6003
This commit is contained in:
committed by
Akshay Joshi
parent
64e6570f00
commit
26b3bc3f74
@@ -1255,10 +1255,13 @@ class ViewNode(PGChildNodeView, VacuumSettings, SchemaDiffObjectCompare):
|
||||
res_rows['tfunction'] = result['rows'][0]['tfunctions']
|
||||
|
||||
# Format arguments
|
||||
if len(res_rows['custom_tgargs']) > 1:
|
||||
formatted_args = ["{0}".format(arg) for arg in
|
||||
res_rows['custom_tgargs']]
|
||||
if len(res_rows['custom_tgargs']) > 0:
|
||||
driver = get_driver(PG_DEFAULT_DRIVER)
|
||||
formatted_args = [driver.qtLiteral(arg)
|
||||
for arg in res_rows['custom_tgargs']]
|
||||
res_rows['tgargs'] = ', '.join(formatted_args)
|
||||
else:
|
||||
res_rows['tgargs'] = None
|
||||
|
||||
SQL = render_template("/".join(
|
||||
[self.trigger_temp_path,
|
||||
|
||||
Reference in New Issue
Block a user