syntax error

This commit is contained in:
Jörn-Michael Miehe 2022-03-28 22:20:25 +00:00
parent 6254daa51d
commit dbbe7a8c35
2 changed files with 4 additions and 8 deletions

View file

@ -63,7 +63,7 @@ async def create_initial_admin(
# create an administrative user # create an administrative user
new_user = User.create(**admin_user.dict()) new_user = User.create(**admin_user.dict())
new_user.set_capabilities((UserCapabilityType.admin)) new_user.set_capabilities([UserCapabilityType.admin])
new_user.update() new_user.update()

View file

@ -88,7 +88,7 @@ async def add_user(
# actually create the new user # actually create the new user
new_user = User.create(**user.dict()) new_user = User.create(**user.dict())
new_user.set_capabilities((UserCapabilityType.login)) new_user.set_capabilities([UserCapabilityType.login])
# fail if creation was unsuccessful # fail if creation was unsuccessful
if new_user is None: if new_user is None:
@ -149,9 +149,7 @@ async def extend_capabilities(
# get and change the user # get and change the user
user = User.get(user_name) user = User.get(user_name)
user.set_capabilities( user.set_capabilities(user.get_capabilities() | set(capabilities))
user.get_capabilities() | set(capabilities)
)
user.update() user.update()
@ -177,8 +175,6 @@ async def remove_capabilities(
# get and change the user # get and change the user
user = User.get(user_name) user = User.get(user_name)
user.set_capabilities( user.set_capabilities(user.get_capabilities() - set(capabilities))
user.get_capabilities() - set(capabilities)
)
user.update() user.update()