Skip to content

Commit fdd45b3

Browse files
simplify id addition logic
1 parent 28f7148 commit fdd45b3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

schematic/manifest/generator.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,15 +1581,11 @@ def _get_end_columns(self, current_schema_headers, existing_manifest_headers, ou
15811581
# Identify columns to add to the end of the manifest
15821582
end_columns = list(out_of_schema_columns)
15831583

1584-
# Make sure want Uuids at the end before entityId is at the end of the list
1585-
for id_name in ['Uuid', 'Id']:
1584+
# Make sure want Ids are placed at end of manifest, in given order.
1585+
for id_name in ['Uuid', 'Id', 'entityId']:
15861586
if id_name in end_columns:
15871587
end_columns.remove(id_name)
15881588
end_columns.append(id_name)
1589-
1590-
if 'entityId' in end_columns:
1591-
end_columns.remove('entityId')
1592-
end_columns.append('entityId')
15931589

15941590
# Add entity_id to the end columns if it should be there but isn't
15951591
elif 'entityId' in (current_schema_headers or existing_manfiest_headers) and 'entityId' not in end_columns:

0 commit comments

Comments
 (0)