diff options
author | coderick14 | 2017-07-04 19:33:17 +0530 |
---|---|---|
committer | coderick14 | 2017-07-04 20:57:40 +0530 |
commit | 6f76f85bc264a58cea717ca8f8bd60b411828dd5 (patch) | |
tree | bcc42ffde20423357da2f56bb380c146db88443d /myadmin | |
parent | f30025c86b414d6611f86487fb73a287d401536e (diff) | |
download | SBHS-2018-Rpi-6f76f85bc264a58cea717ca8f8bd60b411828dd5.tar.gz SBHS-2018-Rpi-6f76f85bc264a58cea717ca8f8bd60b411828dd5.tar.bz2 SBHS-2018-Rpi-6f76f85bc264a58cea717ca8f8bd60b411828dd5.zip |
Show present MID before updating
Diffstat (limited to 'myadmin')
-rw-r--r-- | myadmin/views.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/myadmin/views.py b/myadmin/views.py index 32fa6d6..4c6ccce 100644 --- a/myadmin/views.py +++ b/myadmin/views.py @@ -143,7 +143,7 @@ def get_allocated_mids(req): def get_users(req): checkadmin(req) try: - users = list(Account.objects.values_list("username", flat=True)) + users = list(Account.objects.select_related().values_list("username", "board__mid")) return HttpResponse(json.dumps({"status_code":200, "message":users}), content_type="application/json") except Exception as e: return HttpResponse(json.dumps({"status_code":500, "message":str(e)}), content_type="application/json") |