diff --git a/db.sqlite3 b/db.sqlite3 index 14df51f..7c942b4 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/tkupek_elearning/elearning/views.py b/tkupek_elearning/elearning/views.py index 72379ac..a9757f4 100644 --- a/tkupek_elearning/elearning/views.py +++ b/tkupek_elearning/elearning/views.py @@ -135,6 +135,14 @@ def statistic(request): token = request.GET.get('token') + try: + settings = Setting.objects.get(active=1) + except ObjectDoesNotExist: + settings = None + + if settings is None: + return render_to_response('setting_null.html') + try: auth = Setting.objects.get(active=1, token=token) except ObjectDoesNotExist: