Commit 003abb18 by Calen Pennington

Fix up ErrorDescriptor._construct, and use in in ErrorDescriptor.from_json

parent eaec3a13
......@@ -75,7 +75,7 @@ class ErrorDescriptor(JSONEditingDescriptor):
# real metadata stays in the content, but add a display name
metadata = {'display_name': 'Error: ' + location.name}
super(ErrorDescriptor, self).__init__(
return ErrorDescriptor(
system,
definition,
location=location,
......@@ -90,7 +90,7 @@ class ErrorDescriptor(JSONEditingDescriptor):
@classmethod
def from_json(cls, json_data, system, error_msg='Error not available'):
return cls(
return cls._construct(
system,
json.dumps(json_data, indent=4),
error_msg,
......
......@@ -101,8 +101,6 @@ class Location(_LocationBase):
raise InsufficientSpecificationError(location)
return loc
def __new__(_cls, loc_or_tag=None, org=None, course=None, category=None,
name=None, revision=None):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment