Skip to content

Commit

Permalink
fix: Avoid enqueueing during install (#24679) (#24682)
Browse files Browse the repository at this point in the history
This isn't strictly required but if bench isn't running this can break
installation.

(cherry picked from commit c479a03)

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush committed Feb 1, 2024
1 parent 9fbe981 commit 7825a72
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frappe/core/doctype/role_profile/role_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ def autoname(self):
self.name = self.role_profile

def on_update(self):
self.queue_action("update_all_users", now=frappe.flags.in_test, enqueue_after_commit=True)
self.queue_action(
"update_all_users",
now=frappe.flags.in_test or frappe.flags.in_install,
enqueue_after_commit=True,
)

def update_all_users(self):
"""Changes in role_profile reflected across all its user"""
Expand Down

0 comments on commit 7825a72

Please sign in to comment.