Skip to content

Commit

Permalink
Merge pull request #15457 from ruchamahabal/fix-set-fetch-from
Browse files Browse the repository at this point in the history
fix: set fetch from values before checking permissions
  • Loading branch information
mergify[bot] committed Dec 27, 2021
2 parents b3cacdf + 97d049c commit 047466b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frappe/model/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,13 @@ def insert(self, ignore_permissions=None, ignore_links=None, ignore_if_duplicate

self.set("__islocal", True)

self.check_permission("create")
self._set_defaults()
self.set_user_and_timestamp()
self.set_docstatus()
self.check_if_latest()
self.run_method("before_insert")
self._validate_links()
self.check_permission("create")
self.run_method("before_insert")
self.set_new_name(set_name=set_name, set_child_names=set_child_names)
self.set_parent_in_children()
self.validate_higher_perm_levels()
Expand Down

0 comments on commit 047466b

Please sign in to comment.