Fix issue calling `create_table_from_selectable()` on LotDeviceDescendants

Replace `None` by `Column()`

sqlalchemy_utils on a4154bd0809bc6bbf0c27d5f7c0f3f2872edd779
breaks using `None` as padding parameter needed to follow restriction:
"All selectables passed to CompoundSelect must have identical numbers of columns"
This commit is contained in:
Santiago L 2022-04-06 13:05:31 +02:00
parent ecafc9ea39
commit 186f6398c0
1 changed files with 1 additions and 1 deletions

View File

@ -275,7 +275,7 @@ class LotDeviceDescendants(db.Model):
LotDevice.device_id, LotDevice.device_id,
_desc.c.id.label('parent_lot_id'), _desc.c.id.label('parent_lot_id'),
_ancestor.c.id.label('ancestor_lot_id'), _ancestor.c.id.label('ancestor_lot_id'),
None db.column('padding') # foo column to have same nunber of columns on joined selects (union)
]).select_from(_ancestor).select_from(lot_device).where(db.text(descendants)) ]).select_from(_ancestor).select_from(lot_device).where(db.text(descendants))
# Components # Components