summaryrefslogtreecommitdiff
path: root/releng
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2014-10-21 09:11:48 -0500
committerDan McGee <dan@archlinux.org>2014-10-21 09:40:14 -0500
commit087b4b00031fed52eeddf05ae36825cb498680f0 (patch)
treed322b4d452c0d09827095960e38fac449cabc307 /releng
parentee6bf2782068b917232c71189aea0011b47e876d (diff)
Remove queryset specialization in JSON encoder
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'releng')
-rw-r--r--releng/views.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/releng/views.py b/releng/views.py
index ef81a65c..dbb65c2e 100644
--- a/releng/views.py
+++ b/releng/views.py
@@ -247,9 +247,6 @@ class ReleaseJSONEncoder(DjangoJSONEncoder):
'created', 'md5_sum', 'sha1_sum')
def default(self, obj):
- if hasattr(obj, '__iter__'):
- # mainly for queryset serialization
- return list(obj)
if isinstance(obj, Release):
data = {attr: getattr(obj, attr) or None
for attr in self.release_attributes}
@@ -276,7 +273,7 @@ def releases_json(request):
data = {
'version': 1,
- 'releases': releases,
+ 'releases': list(releases),
'latest_version': latest_version,
}
to_json = json.dumps(data, ensure_ascii=False, cls=ReleaseJSONEncoder)