From f545b59cfdd64df563d7de7b626306808ef31a59 Mon Sep 17 00:00:00 2001 From: Leonidas Poulopoulos Date: Sat, 3 Nov 2012 02:56:41 +0200 Subject: [PATCH] added small checks --- edumanage/views.py | 3 ++- templates/edumanage/welcome.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/edumanage/views.py b/edumanage/views.py index 830bf7b..8253219 100644 --- a/edumanage/views.py +++ b/edumanage/views.py @@ -1343,7 +1343,8 @@ def realmdataxml(request): users = 0 for inst in insts: try: - users = users + inst.institutiondetails.number_user + if inst.institutiondetails.number_user: + users = users + inst.institutiondetails.number_user except InstitutionDetails.DoesNotExist: pass nuserCountry.text = "%s" %users diff --git a/templates/edumanage/welcome.html b/templates/edumanage/welcome.html index b7a2756..eba340a 100644 --- a/templates/edumanage/welcome.html +++ b/templates/edumanage/welcome.html @@ -167,7 +167,7 @@ $.get("{% url get-service-points %}", function(data){