Merge branch 'master' into develop
This commit is contained in:
commit
a3c6497f00
3 changed files with 10 additions and 3 deletions
|
|
@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json
|
|||
from .exceptions import *
|
||||
from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template
|
||||
|
||||
__version__ = '9.2.10'
|
||||
__version__ = '9.2.11'
|
||||
__title__ = "Frappe Framework"
|
||||
|
||||
local = Local()
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@ class Domain(Document):
|
|||
'''Enable roles that are restricted to this domain'''
|
||||
if self.data.restricted_roles:
|
||||
for role_name in self.data.restricted_roles:
|
||||
if not frappe.db.get_value('Role', role_name):
|
||||
frappe.get_doc(dict(doctype='Role', role_name=role_name)).insert()
|
||||
continue
|
||||
|
||||
role = frappe.get_doc('Role', role_name)
|
||||
role.disabled = 0
|
||||
role.save()
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
import frappe
|
||||
|
||||
def execute():
|
||||
domains = ['Education', 'Healthcare', 'Hospitality']
|
||||
try:
|
||||
frappe.get_single('Domain Settings').save()
|
||||
for d in domains:
|
||||
domain = frappe.get_doc('Domain', d)
|
||||
domain.setup_domain()
|
||||
except frappe.LinkValidationError:
|
||||
pass
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue