]> git.0d.be Git - panikweb.git/commitdiff
ignore 0-minutes nonstop slots
authorFrédéric Péters <fpeters@0d.be>
Wed, 5 Oct 2016 14:14:55 +0000 (16:14 +0200)
committerFrédéric Péters <fpeters@0d.be>
Wed, 5 Oct 2016 14:14:55 +0000 (16:14 +0200)
(nonstop slots are kept in base because tracks link to them)

panikweb/views.py

index 613348351f502056149415a2beedd669c6985034..471c26af092f3bcb0c39c8a7bd37ece768ea6db5 100644 (file)
@@ -282,6 +282,8 @@ class Grid(TemplateView):
 
         nonstops = []
         for nonstop in Nonstop.objects.all():
+            if nonstop.start == nonstop.end:
+                continue
             if nonstop.start < nonstop.end:
                 nonstops.append([nonstop.start.hour + nonstop.start.minute/60.,
                                  nonstop.end.hour + nonstop.end.minute/60.,