mirror of
https://github.com/fastapi-admin/fastapi-admin.git
synced 2026-03-13 10:32:25 +08:00
Hide menu when no children menu.
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
## 0.3
|
||||
|
||||
### 0.3.2
|
||||
|
||||
- Hide menu when no children menu.
|
||||
|
||||
### 0.3.1
|
||||
|
||||
- Auto register permission.
|
||||
|
||||
@@ -5,4 +5,4 @@ def version():
|
||||
# with open("pyproject.toml") as f:
|
||||
# ret = re.findall(r'version = "(\d+\.\d+\.\d+)"', f.read())
|
||||
# return ret[0]
|
||||
return "0.3.1"
|
||||
return "0.3.2"
|
||||
|
||||
@@ -30,4 +30,5 @@ async def site(user_id=Depends(jwt_optional)):
|
||||
model = child.url.split("/")[-1]
|
||||
if not await check_has_permission(user, model):
|
||||
site_copy.menus[index].children.remove(child)
|
||||
site_copy.menus = list(filter(lambda x: x.children != [], site_copy.menus))
|
||||
return site_copy.dict(by_alias=True, exclude_unset=True)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "fastapi-admin"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
description = "Fast Admin Dashboard based on fastapi and tortoise-orm."
|
||||
authors = ["long2ice <long2ice@gmail.com>"]
|
||||
license = "Apache-2.0"
|
||||
|
||||
Reference in New Issue
Block a user