diff --git a/groups/views.py b/groups/views.py index fa180e2b..05a3d4e7 100644 --- a/groups/views.py +++ b/groups/views.py @@ -169,7 +169,7 @@ def index(req): misstime__range=(first_day, first_day_of_next_month)).count() trainnum = s_models.Train.objects.filter(deletemark=1, usecomp__in=companys, starttime__range=(first_day, first_day_of_next_month)).count() - companynum = len(companys) + companynum = companys.count() usernum = s_models.User.objects.filter(deletemark=1, usecomp__in=companys).count() return render(req, 'groups/index.html', locals()) diff --git a/mysite/celery.py b/mysite/celery.py index 8171c1df..13a8b7c1 100644 --- a/mysite/celery.py +++ b/mysite/celery.py @@ -33,8 +33,8 @@ app.conf.update( 'schedule': crontab(minute=2), #'args': (5, 6) }, - 'risk-task': { - 'task': 'safesite.tasks.risktask', + 'riskact-task': { + 'task': 'safesite.tasks.riskacttask', 'schedule': timedelta(minutes=1), #'args': (5, 6) }, diff --git a/safesite/views.py b/safesite/views.py index 7f3f94a1..4182a299 100644 --- a/safesite/views.py +++ b/safesite/views.py @@ -3195,7 +3195,7 @@ def importusers(req): @apicheck_login def apicompany(req): - if int(request.session.get('userid'))==8: + if int(req.session.get('userid'))==8: a = req.GET.get('a') menurights = '11,1,2,3,4,5,6,7,8,9,10,12,13,15,16,17,18,19,20,21,22,23,24,28,29,32,36,46,47,48,50'#čœå•įž–į  if a=='add':