浏览代码

Merge pull request #4214 from rmehta/validate-fix

[fix] validate links before calling controller triggers
version-14
Rushabh Mehta 7 年前
committed by GitHub
父节点
当前提交
cca0899bad
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      frappe/model/document.py

+ 2
- 1
frappe/model/document.py 查看文件

@@ -189,6 +189,7 @@ class Document(BaseDocument):
self.validate_higher_perm_levels()

self.flags.in_insert = True
self._validate_links()
self.run_before_save_methods()
self._validate()
self.set_docstatus()
@@ -260,6 +261,7 @@ class Document(BaseDocument):
self.check_if_latest()
self.set_parent_in_children()
self.validate_higher_perm_levels()
self._validate_links()
self.run_before_save_methods()

if self._action != "cancel":
@@ -402,7 +404,6 @@ class Document(BaseDocument):

def _validate(self):
self._validate_mandatory()
self._validate_links()
self._validate_selects()
self._validate_constants()
self._validate_length()


正在加载...
取消
保存