File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -634,10 +634,11 @@ def make_sql(self):
634
634
if not arg1 .heading .secondary_attributes and not arg2 .heading .secondary_attributes :
635
635
# no secondary attributes: use UNION DISTINCT
636
636
fields = arg1 .primary_key
637
- return ("SELECT * FROM (({sql1}) UNION ({sql2})) as `_u%x `" .format (
637
+ return ("SELECT * FROM (({sql1}) UNION ({sql2})) as `_u{alias} `" .format (
638
638
sql1 = arg1 .make_sql () if isinstance (arg1 , Union ) else arg1 .make_sql (fields ),
639
639
sql2 = arg2 .make_sql () if isinstance (arg2 , Union ) else arg2 .make_sql (fields ),
640
- )) % next (self .__count )
640
+ alias = next (self .__count )
641
+ ))
641
642
# with secondary attributes, use union of left join with antijoin
642
643
fields = self .heading .names
643
644
sql1 = arg1 .join (arg2 , left = True ).make_sql (fields )
You can’t perform that action at this time.
0 commit comments