Feature: Clients can be enabled from the client detail page.
This commit is contained in:
parent
62c8b64370
commit
fcef417dfc
@ -23,8 +23,9 @@ def html(request):
|
||||
@TryCatchFunction
|
||||
def update(request):
|
||||
item = Client.by_id(uuid.UUID(request.matchdict['id']))
|
||||
if item.otp is None:
|
||||
item.enabled = request.json_body['Enabled']
|
||||
item.enabled = request.json_body['Enabled']
|
||||
if item.enabled:
|
||||
item.otp = None
|
||||
item.name = request.json_body['Name']
|
||||
transaction.commit()
|
||||
return {}
|
||||
|
Loading…
Reference in New Issue
Block a user