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
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Monday, March 24th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
ddf3a820
Commit
ddf3a820
authored
5 years ago
by
Diana Huang
Browse files
Options
Downloads
Patches
Plain Diff
Remove items from a different dictionary than the one we're
iterating over.
parent
35c2d766
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/djangoapps/course_api/blocks/serializers.py
+3
-1
3 additions, 1 deletion
lms/djangoapps/course_api/blocks/serializers.py
with
3 additions
and
1 deletion
lms/djangoapps/course_api/blocks/serializers.py
+
3
−
1
View file @
ddf3a820
...
...
@@ -104,9 +104,11 @@ class BlockSerializer(serializers.Serializer): # pylint: disable=abstract-metho
if
authorization_denial_reason
and
authorization_denial_message
:
data
[
'
authorization_denial_reason
'
]
=
authorization_denial_reason
data
[
'
authorization_denial_message
'
]
=
authorization_denial_message
cleaned_data
=
data
.
copy
()
for
field
in
data
.
keys
():
# pylint: disable=consider-iterating-dictionary
if
field
not
in
FIELDS_ALLOWED_IN_AUTH_DENIED_CONTENT
:
del
data
[
field
]
del
cleaned_data
[
field
]
data
=
cleaned_data
return
data
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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