Skip to content

Commit

Permalink
fix: "try" adding all users to default workspace on install
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkothari22 committed Dec 6, 2024
1 parent b938048 commit fb3cab0
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions raven/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,17 @@ def create_general_channel():
# Make all users a member of this workspace and set them as admins
users = frappe.get_all("Raven User")
for user in users:
frappe.get_doc(
{
"doctype": "Raven Workspace Member",
"workspace": default_workspace.name,
"user": user.name,
"is_admin": True,
}
).insert(ignore_permissions=True)
try:
frappe.get_doc(
{
"doctype": "Raven Workspace Member",
"workspace": default_workspace.name,
"user": user.name,
"is_admin": True,
}
).insert(ignore_permissions=True)
except Exception as e:
pass # nosemgrep

channel = [
{
Expand Down

0 comments on commit fb3cab0

Please sign in to comment.