Skip to content

Commit 2c56ef9

Browse files
committed
chore(controller): use user id request manager api
1 parent 72c7ca4 commit 2c56ef9

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

rootfs/api/manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ def delete(self, url, **kwargs):
5050

5151
class User(ManagerAPI):
5252

53-
def get_status(self, username):
53+
def get_status(self, id):
5454
"""
5555
{
5656
"is_active": False,
5757
"message": "The user is in arrears"
5858
}
5959
"""
60-
url = f"{settings.WORKFLOW_MANAGER_URL}/users/{username}/status/"
60+
url = f"{settings.WORKFLOW_MANAGER_URL}/users/{id}/status/"
6161
return self.get(url=url).json()
6262

6363

rootfs/api/permissions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def get_app_status(app):
1111
if blocklist:
1212
return False, blocklist.remark
1313
if settings.WORKFLOW_MANAGER_URL is not None:
14-
status = manager.User().get_status(app.owner)
14+
status = manager.User().get_status(app.owner.pk)
1515
if not status["is_active"]:
1616
return False, status["message"]
1717
return True, None

0 commit comments

Comments
 (0)