Skip to content

Commit

Permalink
fix array clearing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kentbull committed Mar 7, 2023
1 parent 89a614c commit 38d9f8c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/kaslcred/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def calc_eval_order(schemas: list[ACDCSchema], evaluation_order=[], popped=[]):
:return: evaluation_order - the ordered list of schemas to evaluate
"""
# evaluation_order is a list of schema names
if len(schemas) == 1:
return [schemas[0].schemaName]
# if len(schemas) == 1:
# return [schemas[0].schemaName]
if len(popped) > 0:
schemas.extend(popped)
popped = []
Expand Down Expand Up @@ -70,8 +70,8 @@ def calc_eval_order(schemas: list[ACDCSchema], evaluation_order=[], popped=[]):
if popped_index != -1:
schemas.remove(schemas[popped_index])
return calc_eval_order(schemas, evaluation_order, popped)
popped.clear()
schemas.clear()


new_order=[]
for ord in evaluation_order:
new_order.append(ord)
Expand All @@ -91,6 +91,7 @@ def link_schemas(schema_source_root, schemas: list[ACDCSchema]):
evaluation_order = calc_eval_order(schemas, evaluation_order=[], popped=[])
schema_results = {}
saidified_schemas = []
print(f'evaluation order {evaluation_order} schema root {schema_source_root} schemas {schemas}')
for schema_name in evaluation_order:
schema = list(filter(lambda s: s.schemaName == schema_name, schemas))[0]
saidified = construct_schema(schema, f'{schema_source_root}', schema_results)
Expand Down

0 comments on commit 38d9f8c

Please sign in to comment.