Skip to content

Commit

Permalink
Error for to many stations in a cluster
Browse files Browse the repository at this point in the history
Partly addresses #66.
Unfortunately this throws an error for Amsterdam..
  • Loading branch information
Arne de Laat committed Feb 17, 2015
1 parent 466650f commit 9781965
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions django_publicdb/raw_data/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,10 @@ def download_coincidences(request):
stations = (Station.objects.filter(Q(cluster__parent=cluster) |
Q(cluster=cluster))
.values_list('number', flat=True))
if len(stations) >= 30:
msg = ("To many stations in this cluster, "
"manually select a subset of stations.")
return HttpResponseBadRequest(msg, content_type="text/plain")

download = request.GET.get('download', False)
if download in ['true', 'True']:
Expand Down

0 comments on commit 9781965

Please sign in to comment.