]> git.0d.be Git - django-panik-nonstop.git/commitdiff
don't include disabled nonstop zones
authorFrédéric Péters <fpeters@0d.be>
Thu, 5 Oct 2017 11:50:04 +0000 (13:50 +0200)
committerFrédéric Péters <fpeters@0d.be>
Thu, 5 Oct 2017 11:50:04 +0000 (13:50 +0200)
nonstop/forms.py

index 1b4b4aaf87e8ce3a3525e1c8f86b91d073f70548..682297f588d6cfaf5f0ba98d060c29cf7f9f8174 100644 (file)
@@ -5,7 +5,7 @@ from .models import Track
 
 def get_nonstop_zones():
     from emissions.models import Nonstop
-    return [(x.id, x.title) for x in Nonstop.objects.all()]
+    return [(x.id, x.title) for x in Nonstop.objects.all() if x.start != x.end]
 
 def get_optional_nonstop_zones():
     return [('', '')] + get_nonstop_zones()