Commits

Jesús Espino committed 1e5d609

When no visits, visits are 0

  • Participants
  • Parent commits 72908db

Comments (0)

Files changed (1)

visits/templatetags/visits_tags.py

                 object_model=obj.__class__.__name__,
                 object_id=obj.id
             ).aggregate(visits_sum=Sum('visits'))['visits_sum']
+        else:
+            context[self.context_var] = 0
         return ''
 
 def do_get_visits(parser, token):