Skip to content

Commit

Permalink
Update flexmeasures/ui/utils/breadcrumb_utils.py
Browse files Browse the repository at this point in the history
Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com>
Signed-off-by: Victor <victorgarciareolid98@gmail.com>
  • Loading branch information
victorgarcia98 and Flix6x committed Feb 29, 2024
1 parent 10e3601 commit 537940e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flexmeasures/ui/utils/breadcrumb_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def get_siblings(entity: Sensor | Asset | Account | None) -> list[dict]:
if isinstance(entity, Asset):
if entity.parent_asset is not None:
sibling_assets = entity.parent_asset.child_assets
elif entity.owner is not None:
sibling_assets = entity.owner.generic_assets
else:
session = current_app.db.session
sibling_assets = session.scalars(
Expand Down

0 comments on commit 537940e

Please sign in to comment.