Fix RE-SQL for triggers with a single arg. Fixes #2668

This commit is contained in:
Murtuza Zabuawala 2017-08-31 09:39:09 +01:00 committed by Dave Page
parent 821442ed8f
commit 52840d68a8
2 changed files with 3 additions and 3 deletions

View File

@ -952,7 +952,7 @@ class TriggerView(PGChildNodeView):
# We know that trigger has more than 1 argument, let's join them
data['tgargs'] = self._format_args(data['custom_tgargs'])
if len(data['tgattr']) > 1:
if len(data['tgattr']) >= 1:
columns = ', '.join(data['tgattr'].split(' '))
data['columns'] = self._column_details(tid, columns)

View File

@ -995,7 +995,7 @@ class BaseTableView(PGChildNodeView):
# We know that trigger has more than 1 argument, let's join them
data['tgargs'] = self._format_args(data['custom_tgargs'])
if len(data['tgattr']) > 1:
if len(data['tgattr']) >= 1:
columns = ', '.join(data['tgattr'].split(' '))
SQL = render_template("/".join([self.trigger_template_path,
@ -1009,7 +1009,7 @@ class BaseTableView(PGChildNodeView):
columns = []
for col_row in rset['rows']:
columns.append({'column': col_row['name']})
columns.append(col_row['name'])
data['columns'] = columns