From 186f6398c06ae8bf1b25fa2ca9fb0887868c6619 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Wed, 6 Apr 2022 13:05:31 +0200 Subject: [PATCH] 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" --- ereuse_devicehub/resources/lot/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/resources/lot/models.py b/ereuse_devicehub/resources/lot/models.py index 88c68626..bee4398f 100644 --- a/ereuse_devicehub/resources/lot/models.py +++ b/ereuse_devicehub/resources/lot/models.py @@ -275,7 +275,7 @@ class LotDeviceDescendants(db.Model): LotDevice.device_id, _desc.c.id.label('parent_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)) # Components