From 0a598679b31a99a7e7d5042ead910458295216b1 Mon Sep 17 00:00:00 2001 From: http Date: Tue, 23 May 2017 01:11:38 +0300 Subject: [PATCH] FIXBUG --- abonapp/views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/abonapp/views.py b/abonapp/views.py index a304d06..ca493d4 100644 --- a/abonapp/views.py +++ b/abonapp/views.py @@ -731,9 +731,10 @@ def charts(request, gid, uid): charts_data = StatElem.objects.chart(abon.ip_address) abontariff = abon.active_tariff() - high = abontariff.speedIn + abontariff.speedOut - if high > 100: - high = 100 + if abontariff is not None: + high = abontariff.speedIn + abontariff.speedOut + if high > 100: + high = 100 except models.Abon.DoesNotExist: messages.error(request, _('Abon does not exist'))