fix: ensure workflow state field is created post-validation
This commit is contained in:
parent
856513423f
commit
ca812bb307
1 changed files with 4 additions and 2 deletions
|
|
@ -33,12 +33,14 @@ class Workflow(Document):
|
|||
|
||||
def validate(self):
|
||||
self.set_active()
|
||||
self.create_custom_field_for_workflow_state()
|
||||
self.update_default_workflow_status()
|
||||
self.validate_docstatus()
|
||||
|
||||
def after_insert(self):
|
||||
self.create_custom_field_for_workflow_state()
|
||||
|
||||
def on_update(self):
|
||||
frappe.clear_cache(doctype=self.document_type)
|
||||
self.update_default_workflow_status()
|
||||
|
||||
def create_custom_field_for_workflow_state(self):
|
||||
frappe.clear_cache(doctype=self.document_type)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue