Skip to content

Commit

Permalink
add description to types of work in selection lists
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaugen committed Jun 17, 2015
1 parent c594d1f commit 9b8abba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion valuenetwork/valueaccounting/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ def label_from_instance(self, obj):

class WorkModelChoiceField(forms.ModelChoiceField):
def label_from_instance(self, obj):
return obj.name
if obj.description:
label = ": ".join([obj.name, obj.description])
else:
label = obj.name
return label

class ResourceModelChoiceField(forms.ModelChoiceField):
def label_from_instance(self, obj):
Expand Down

0 comments on commit 9b8abba

Please sign in to comment.