Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
515e851e
Unverified
Commit
515e851e
authored
7 years ago
by
Gregory Martin
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #17643 from edx/sstudent/safe_settings_check
guard against missing item
parents
730c6401
6f5c49e7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openedx/core/djangoapps/user_api/accounts/utils.py
+7
-2
7 additions, 2 deletions
openedx/core/djangoapps/user_api/accounts/utils.py
with
7 additions
and
2 deletions
openedx/core/djangoapps/user_api/accounts/utils.py
+
7
−
2
View file @
515e851e
...
...
@@ -14,6 +14,7 @@ from completion.models import BlockCompletion
from
openedx.core.djangoapps.site_configuration.models
import
SiteConfiguration
from
openedx.core.djangoapps.theming.helpers
import
get_config_value_from_site_or_settings
,
get_current_site
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.exceptions
import
ItemNotFoundError
def
validate_social_link
(
platform_name
,
new_social_link
):
...
...
@@ -161,9 +162,13 @@ def retrieve_last_sitewide_block_completed(username):
return
lms_root
=
SiteConfiguration
.
get_value_for_org
(
candidate_course
.
org
,
"
LMS_ROOT_URL
"
,
settings
.
LMS_ROOT_URL
)
item
=
modulestore
().
get_item
(
candidate_block_key
,
depth
=
1
)
if
not
lms_root
:
try
:
item
=
modulestore
().
get_item
(
candidate_block_key
,
depth
=
1
)
except
ItemNotFoundError
:
item
=
None
if
not
(
lms_root
and
item
):
return
return
u
"
{lms_root}/courses/{course_key}/jump_to/{location}
"
.
format
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment