mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-24 22:58:46 +01:00
Bug fix wwhen trying to get a gerty screen that doesnt exist
This commit is contained in:
parent
e193c4ef47
commit
aa33f74f5d
1 changed files with 4 additions and 1 deletions
|
@ -153,7 +153,10 @@ async def api_gerty_json(gerty_id: str, p: int = None): # page number
|
|||
|
||||
# Get a screen slug by its position in the screens_list
|
||||
def get_screen_slug_by_index(index: int, screens_list):
|
||||
return list(screens_list)[index]
|
||||
if(index < len(screens_list) - 1):
|
||||
return list(screens_list)[index]
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
# Get a list of text items for the screen number
|
||||
|
|
Loading…
Add table
Reference in a new issue