fixed bug with no settings in statistic page
This commit is contained in:
parent
1ba6ed1980
commit
9b0708fdff
2 changed files with 8 additions and 0 deletions
BIN
db.sqlite3
BIN
db.sqlite3
Binary file not shown.
|
@ -135,6 +135,14 @@ def statistic(request):
|
||||||
|
|
||||||
token = request.GET.get('token')
|
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:
|
try:
|
||||||
auth = Setting.objects.get(active=1, token=token)
|
auth = Setting.objects.get(active=1, token=token)
|
||||||
except ObjectDoesNotExist:
|
except ObjectDoesNotExist:
|
||||||
|
|
Loading…
Reference in a new issue