summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mirrors/views/api.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mirrors/views/api.py b/mirrors/views/api.py
index 06574082..b72585e6 100644
--- a/mirrors/views/api.py
+++ b/mirrors/views/api.py
@@ -45,7 +45,9 @@ class ExtendedMirrorStatusJSONEncoder(MirrorStatusJSONEncoder):
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)