Skip to content

Commit d68e695

Browse files
committed
always return union for original statement as well
1 parent 77e12b5 commit d68e695

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

pgsync/base.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ def _foreign_key_view_statement(
539539
table_constraints.c.table_name
540540
)
541541

542-
unions = []
542+
unions = [statement]
543543
if FOREIGN_KEY_VIEWNAME in views:
544544
values = self.fetchall(sa.select([
545545
sa.column('table_name'),
@@ -580,10 +580,7 @@ def _foreign_key_view_statement(
580580
)
581581
)
582582

583-
if unions:
584-
statement = sa.union(*unions)
585-
586-
return statement
583+
return sa.union(*unions)
587584

588585
def create_views(self, schema, tables, user_defined_fkey_tables):
589586

0 commit comments

Comments
 (0)