We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b601386 commit 298589bCopy full SHA for 298589b
nc_py_api/ex_app/ui/top_menu.py
@@ -38,8 +38,11 @@ def icon(self) -> str:
38
@property
39
def admin_required(self) -> bool:
40
"""Flag that determines whether the entry menu is displayed only for administrators."""
41
- print(self._raw_data["admin_required"])
42
- return bool(self._raw_data["admin_required"])
+ return (
+ bool(int(self._raw_data["admin_required"]))
43
+ if isinstance(self._raw_data["admin_required"], str)
44
+ else bool(self._raw_data["admin_required"])
45
+ )
46
47
def __repr__(self):
48
return f"<{self.__class__.__name__} name={self.name}, admin_required={self.admin_required}>"
0 commit comments