Skip to content

Commit

Permalink
Infrastructure: Optimized load
Browse files Browse the repository at this point in the history
added an joinedload for the Switches so there is not allways a new request
solves: #699
  • Loading branch information
agmes4 committed Mar 16, 2024
1 parent 90dea1e commit 2edf427
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/blueprints/infrastructure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def switches_json() -> ResponseValue:
btn_class="btn-link",
),
)
for switch in Switch.q.all()
for switch in Switch.q.options(joinedload(Switch.host)).all()
]
).model_dump()

Expand Down

0 comments on commit 2edf427

Please sign in to comment.