diff --git a/core/views/logbooks.py b/core/views/logbooks.py index 838595a..6e207ca 100644 --- a/core/views/logbooks.py +++ b/core/views/logbooks.py @@ -158,7 +158,13 @@ class QMs_jsonListView(ListView): def person(request, slug=""): """Now very much simpler with an unambiguous slug """ - this_person = Person.objects.get(slug=slug) + try: + this_person = Person.objects.get(slug=slug) + except: + msg = f" Person '{slug=}' not found in database. DATABASE RESET required - ask a nerd." + print(msg) + return render(request, "errors/generic.html", {"message": msg}) + current_year = current_expo() return render(request, "person.html", {"person": this_person, "year": current_year})