diff --git a/tiramisu_json_api/api.py b/tiramisu_json_api/api.py index 8026194..67df2dd 100644 --- a/tiramisu_json_api/api.py +++ b/tiramisu_json_api/api.py @@ -627,7 +627,6 @@ class Config: def is_hidden(self, path: str, index: Optional[int]) -> bool: - property_ = 'hidden' for property_, needs in {'hidden': True, 'display': False}.items(): if property_ in self.temp.get(path, {}): value = self.temp[path][property_] @@ -638,7 +637,7 @@ class Config: elif self.model.get(path, {}).get(property_, None) == needs: return True 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 False