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 @Lazy
def workItemTypes(self): 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 typeNames = options.workitem_types
if typeNames: if typeNames:
return [workItemTypes[name] for name in typeNames] return [workItemTypes[name] for name in typeNames]