Include error message in JSON detail response
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
e739d440e9
commit
65daa766ca
@ -45,7 +45,9 @@ def default(self, obj):
|
||||
check_time__gte=cutoff).order_by('check_time'))
|
||||
return data
|
||||
if isinstance(obj, MirrorLog):
|
||||
return {attr: getattr(obj, attr) for attr in self.log_attributes}
|
||||
data = {attr: getattr(obj, attr) for attr in self.log_attributes}
|
||||
data['error'] = obj.error or None
|
||||
return data
|
||||
return super(ExtendedMirrorStatusJSONEncoder, self).default(obj)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user