Skip to content

Commit 298589b

Browse files
committed
UI: file_actions: dev(2) [ci skip]
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
1 parent b601386 commit 298589b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

nc_py_api/ex_app/ui/top_menu.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ def icon(self) -> str:
3838
@property
3939
def admin_required(self) -> bool:
4040
"""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"])
41+
return (
42+
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+
)
4346

4447
def __repr__(self):
4548
return f"<{self.__class__.__name__} name={self.name}, admin_required={self.admin_required}>"

0 commit comments

Comments
 (0)