mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-14 18:07:22 +00:00
Debugging, and make get_name function accessable (should really be renamed)
This commit is contained in:
@@ -70,11 +70,6 @@ def getTripForm(expedition):
|
||||
return self.cleaned_data
|
||||
|
||||
class PersonTripForm(forms.Form):
|
||||
def get_name(pe):
|
||||
if pe.nickname:
|
||||
return pe.nickname
|
||||
else:
|
||||
return pe.person.first_name
|
||||
names = [get_name(pe) for pe in PersonExpedition.objects.filter(expedition = expedition)]
|
||||
names.sort()
|
||||
names = ["-----"] + names
|
||||
@@ -86,3 +81,8 @@ def getTripForm(expedition):
|
||||
|
||||
return PersonTripFormSet, TripForm
|
||||
|
||||
def get_name(pe):
|
||||
if pe.nickname:
|
||||
return pe.nickname
|
||||
else:
|
||||
return pe.person.first_name
|
||||
|
||||
Reference in New Issue
Block a user