fix option checking for new work item

This commit is contained in:
Helmut Merz 2012-07-29 10:23:53 +02:00
parent ac1968233d
commit c2ee316927

View file

@ -350,7 +350,10 @@ class CreateWorkItemForm(ObjectForm, BaseTrackView):
@Lazy
def workItemTypes(self):
options = IOptions(adapted(self.task.conceptType))
task = self.task
if task is None:
task = self.target
options = IOptions(adapted(task.conceptType))
typeNames = options.workitem_types
if typeNames:
return [workItemTypes[name] for name in typeNames]