index is an str
This commit is contained in:
parent
dae6779e72
commit
34e7a86130
|
@ -627,7 +627,6 @@ class Config:
|
||||||
def is_hidden(self,
|
def is_hidden(self,
|
||||||
path: str,
|
path: str,
|
||||||
index: Optional[int]) -> bool:
|
index: Optional[int]) -> bool:
|
||||||
property_ = 'hidden'
|
|
||||||
for property_, needs in {'hidden': True, 'display': False}.items():
|
for property_, needs in {'hidden': True, 'display': False}.items():
|
||||||
if property_ in self.temp.get(path, {}):
|
if property_ in self.temp.get(path, {}):
|
||||||
value = self.temp[path][property_]
|
value = self.temp[path][property_]
|
||||||
|
@ -638,7 +637,7 @@ class Config:
|
||||||
elif self.model.get(path, {}).get(property_, None) == needs:
|
elif self.model.get(path, {}).get(property_, None) == needs:
|
||||||
return True
|
return True
|
||||||
index = str(index)
|
index = str(index)
|
||||||
if index is not None and index in self.model.get(path, {}) and self.model.get(path, {}).get(index, {}).get(property_, None) == needs:
|
if index != 'None' and index in self.model.get(path, {}) and self.model.get(path, {}).get(index, {}).get(property_, None) == needs:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue