summaryrefslogtreecommitdiff
path: root/myadmin
diff options
context:
space:
mode:
authordk-152017-05-31 17:17:40 +0530
committerdk-152017-05-31 17:18:44 +0530
commit26717861ef6ffbedbbde3a528d69a0778cd454b5 (patch)
treee308446d481aa58e715c192a552cdc112302803a /myadmin
parent83722b9547ec0c2e8394cf50052cc66bec1791a5 (diff)
downloadSBHS-2018-Rpi-26717861ef6ffbedbbde3a528d69a0778cd454b5.tar.gz
SBHS-2018-Rpi-26717861ef6ffbedbbde3a528d69a0778cd454b5.tar.bz2
SBHS-2018-Rpi-26717861ef6ffbedbbde3a528d69a0778cd454b5.zip
Add js to update MID in admin panel
Diffstat (limited to 'myadmin')
-rw-r--r--myadmin/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/myadmin/views.py b/myadmin/views.py
index a3f6dda..97a23c3 100644
--- a/myadmin/views.py
+++ b/myadmin/views.py
@@ -4,7 +4,7 @@ from django.contrib.auth.decorators import login_required
from django.views.decorators.csrf import csrf_exempt
from django.db.models import Count
from django.core.exceptions import ObjectDoesNotExist
-from sbhs_server.tables.models import Board, Booking, Slot, Experiment
+from sbhs_server.tables.models import Board, Booking, Slot, Experiment, Account
from sbhs_server import settings,sbhs
import subprocess,json,serial,os, datetime
# Create your views here.
@@ -133,7 +133,7 @@ def monitor_experiment(req):
@login_required(redirect_field_name=None)
def get_allocated_mids(req):
checkadmin(req)
- mid_count = Account.objects.select_related().filter('board__online'=1).values('board__mid', 'board_id').annotate(mcount=Count('board_id')).order_by('-mcount')
+ mid_count = Account.objects.select_related().filter(board__online=1).values('board__mid', 'board_id').annotate(mcount=Count('board_id')).order_by('mcount')
return render(req, 'admin/changeMID.html', {"mid_count" : mid_count})
def user_exists(username):