Bläddra i källkod

Merge pull request #4214 from rmehta/validate-fix

[fix] validate links before calling controller triggers
version-14
Rushabh Mehta 7 år sedan
committed by GitHub
förälder
incheckning
cca0899bad
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. +2
    -1
      frappe/model/document.py

+ 2
- 1
frappe/model/document.py Visa fil

@@ -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()


Laddar…
Avbryt
Spara