Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
仰若水
frappe
Commits
cd32e87b
Commit
cd32e87b
authored
7 years ago
by
Faris Ansari
Committed by
Nabin Hait
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
[fix] Domain Setting patch (#4464)
* [fix] Domain Setting patch * minor fix * Update domain.py
parent
60036a0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frappe/core/doctype/domain/domain.py
+4
-0
frappe/core/doctype/domain/domain.py
frappe/patches/v9_1/resave_domain_settings.py
+5
-2
frappe/patches/v9_1/resave_domain_settings.py
with
9 additions
and
2 deletions
+9
-2
frappe/core/doctype/domain/domain.py
View file @
cd32e87b
...
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
frappe/patches/v9_1/resave_domain_settings.py
View file @
cd32e87b
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
\ No newline at end of file
pass
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help