mirror of
https://github.com/lumapu/ahoy.git
synced 2025-04-29 18:26:21 +02:00
Merge pull request #1025 from Andy-Voigt/main
Fixed index out of bounds
This commit is contained in:
commit
b9fda459cc
1 changed files with 10 additions and 9 deletions
|
@ -154,15 +154,16 @@ class StatusResponse(Response):
|
||||||
while s_exists:
|
while s_exists:
|
||||||
s_exists = False
|
s_exists = False
|
||||||
string_id = len(strings)
|
string_id = len(strings)
|
||||||
string = {}
|
if string_id < len(self.inv_strings):
|
||||||
string['name'] = self.inv_strings[string_id]['s_name']
|
string = {}
|
||||||
for key in self.string_keys:
|
string['name'] = self.inv_strings[string_id]['s_name']
|
||||||
prop = f'dc_{key}_{string_id}'
|
for key in self.string_keys:
|
||||||
if hasattr(self, prop):
|
prop = f'dc_{key}_{string_id}'
|
||||||
s_exists = True
|
if hasattr(self, prop):
|
||||||
string[key] = getattr(self, prop)
|
s_exists = True
|
||||||
if s_exists:
|
string[key] = getattr(self, prop)
|
||||||
strings.append(string)
|
if s_exists:
|
||||||
|
strings.append(string)
|
||||||
|
|
||||||
return strings
|
return strings
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue