Browse Source

404 on crawl not found

master
Sebastian Lohff 7 years ago
parent
commit
51b2ee7e45
  1. 7
      bgpdata/views.py

7
bgpdata/views.py

@ -6,7 +6,12 @@ def overview(request): @@ -6,7 +6,12 @@ def overview(request):
return render(request, 'bgpdata/overview.html', {"crawls": crawls})
def showMap(request, crawlId):
crawl = CrawlRun.objects.get(id=crawlId)
crawl = None
try:
crawl = CrawlRun.objects.get(id=crawlId)
except CrawlRun.DoesNotExist:
return render(request, "bgpdata/no-map-found.html", {"crawl_id": crawlId})
ASses = AS.objects.filter(crawl=crawl)
peerings = Peering.objects.filter(as1__crawl=crawl)

Loading…
Cancel
Save