Fixes bug with Course Blocks API student_view_data parameter

Prior to this change, providing any student_view_data querystring would result
in student_view_data returned for all XBlock types.

Updates Course Blocks API tests to verify.
This commit is contained in:
Jillian Vogel
2017-10-18 14:19:00 +10:30
parent ab011314ef
commit ae15e69a0a
2 changed files with 19 additions and 10 deletions

View File

@@ -312,7 +312,7 @@ class FieldData(object):
if self._is_own_field(field_name):
return super(FieldData, self).__delattr__(field_name)
else:
delattr(self.fields, field_name)
del self.fields[field_name]
def _is_own_field(self, field_name):
"""