Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
679f0130
Commit
679f0130
authored
Feb 16, 2017
by
Hasnain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the "get_value_for_org" for str and list org.
parent
81ab0d81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
openedx/core/djangoapps/site_configuration/models.py
+5
-1
No files found.
openedx/core/djangoapps/site_configuration/models.py
View file @
679f0130
...
...
@@ -77,7 +77,11 @@ class SiteConfiguration(models.Model):
Configuration value for the given key.
"""
for
configuration
in
cls
.
objects
.
filter
(
values__contains
=
org
,
enabled
=
True
)
.
all
():
course_org_filter
=
configuration
.
get_value
(
'course_org_filter'
,
None
)
course_org_filter
=
configuration
.
get_value
(
'course_org_filter'
,
[])
# The value of 'course_org_filter' can be configured as a string representing
# a single organization or a list of strings representing multiple organizations.
if
not
isinstance
(
course_org_filter
,
list
):
course_org_filter
=
[
course_org_filter
]
if
org
in
course_org_filter
:
return
configuration
.
get_value
(
name
,
default
)
return
default
...
...
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