Skip to content

Commit

Permalink
Fix: Cnclude missing direct model names (#822)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykalmax authored May 8, 2023
1 parent 8d26c8c commit b72f007
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions web/server/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,20 +121,20 @@ def get_modified_snapshots(
metadata.add(snapshot_name)

direct_change_model_names = [change.model_name for change in direct]
indirect_change_model_names = [change.model_name for change in indirect]

for change in indirect:
change.direct = [
model_name
for model_name in change.direct
if model_name in direct_change_model_names
or model_name in indirect_change_model_names
]
change.direct.reverse()

return ModelsDiff(
direct=direct,
indirect=[
ChangeIndirect(
model_name=change.model_name,
direct=[
model_name
for model_name in change.direct
if model_name in direct_change_model_names
],
)
for change in indirect
],
indirect=indirect,
metadata=metadata,
)

Expand Down

0 comments on commit b72f007

Please sign in to comment.