mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Fix HR state update
This commit is contained in:
@@ -186,7 +186,9 @@ def update_application(request, applicationid, status):
|
||||
""" Update a application's status """
|
||||
|
||||
app = get_object_or_404(Application, id=applicationid)
|
||||
if check_permissions(request.user, app):
|
||||
|
||||
perm = check_permissions(request.user, app)
|
||||
if perm == HR_ADMIN or (perm == HR_VIEWONLY and int(status) <= 1):
|
||||
if not app.status == status:
|
||||
app.status = status
|
||||
app.save(user=request.user)
|
||||
|
||||
Reference in New Issue
Block a user