mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-14 05:55:06 +00:00
catch unknown scotsman error
This commit is contained in:
@@ -115,16 +115,13 @@ class Expeditions_jsonListView(ListView):
|
||||
|
||||
|
||||
def person(request, first_name='', last_name='', ):
|
||||
this_person = Person.objects.get(first_name = first_name, last_name = last_name)
|
||||
try:
|
||||
this_person = Person.objects.get(first_name = first_name, last_name = last_name)
|
||||
return render(request,'person.html', {'person': this_person, })
|
||||
except:
|
||||
message = f'Person not found - possibly Scottish? (We have a name parser issue with Mc, Mac etc.)'
|
||||
return render(request, 'errors/generic.html', {'message': message})
|
||||
|
||||
# This is for removing the reference to the user's profile, in case they set it to the wrong person
|
||||
if request.method == 'GET':
|
||||
if request.GET.get('clear_profile')=='True':
|
||||
this_person.user=None
|
||||
this_person.save()
|
||||
return HttpResponseRedirect(reverse('profiles_select_profile'))
|
||||
|
||||
return render(request,'person.html', {'person': this_person, })
|
||||
|
||||
|
||||
def get_person_chronology(personexpedition):
|
||||
|
||||
Reference in New Issue
Block a user