Files
mayan-edms/mayan/apps/document_states/managers.py

8 lines
221 B
Python

from django.db import models
class WorkflowManager(models.Manager):
def launch_for(self, document):
for workflow in document.document_type.workflows.all():
workflow.launch_for(document=document)