0001-misc-move-workflow-custom-directories-getter-to-work.patch
wcs/formdata.py | ||
---|---|---|
531 | 531 |
return None |
532 | 532 |
return wf_status.get_action_form(self, user) |
533 | 533 | |
534 |
def get_workflow_subdirectories(self): |
|
535 |
wf_status = self.get_status() |
|
536 |
if not wf_status: # draft |
|
537 |
return [] |
|
538 |
return wf_status.get_subdirectories(self) |
|
539 | ||
540 | 534 |
def handle_workflow_form(self, user, form): |
541 | 535 |
wf_status = self.get_status() |
542 | 536 |
if not wf_status: |
wcs/forms/common.py | ||
---|---|---|
136 | 136 |
self._q_exports.append(q) |
137 | 137 | |
138 | 138 |
if self.formdef.workflow and register_workflow_subdirs: |
139 |
for name, directory in self.filled.get_workflow_subdirectories():
|
|
139 |
for name, directory in self.formdef.workflow.get_subdirectories(self.filled):
|
|
140 | 140 |
self._q_exports.append(name) |
141 | 141 |
setattr(self, name, directory) |
142 | 142 |
wcs/workflows.py | ||
---|---|---|
431 | 431 |
break |
432 | 432 |
return actions |
433 | 433 | |
434 |
def get_subdirectories(self, formdata): |
|
435 |
wf_status = formdata.get_status() |
|
436 |
if not wf_status: # draft |
|
437 |
return [] |
|
438 |
return wf_status.get_subdirectories(formdata) |
|
439 | ||
434 | 440 |
def __setstate__(self, dict): |
435 | 441 |
self.__dict__.update(dict) |
436 | 442 |
for s in self.possible_status + (self.global_actions or []): |
437 |
- |