mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-22 15:34:26 +01:00
fix issue if there is only one top level card
This commit is contained in:
@@ -166,8 +166,10 @@ class LuiBackendConfig(object):
|
|||||||
last_card = next
|
last_card = next
|
||||||
cur.uuid_next = next.uuid
|
cur.uuid_next = next.uuid
|
||||||
next.uuid_prev = cur.uuid
|
next.uuid_prev = cur.uuid
|
||||||
first_card.uuid_prev = last_card.uuid
|
# if there is only one top level card first and last card will be none
|
||||||
last_card.uuid_next = first_card.uuid
|
if first_card and last_card:
|
||||||
|
first_card.uuid_prev = last_card.uuid
|
||||||
|
last_card.uuid_next = first_card.uuid
|
||||||
|
|
||||||
# parse screensaver
|
# parse screensaver
|
||||||
self._config_screensaver = Card(self.get("screensaver"))
|
self._config_screensaver = Card(self.get("screensaver"))
|
||||||
@@ -237,4 +239,4 @@ class LuiBackendConfig(object):
|
|||||||
return self._config_cards[0]
|
return self._config_cards[0]
|
||||||
|
|
||||||
def get_card_by_uuid(self, uuid):
|
def get_card_by_uuid(self, uuid):
|
||||||
return self._config_card_table.get(uuid)
|
return self._config_card_table.get(uuid)
|
||||||
|
|||||||
Reference in New Issue
Block a user