From 42b7a9b94fc7f7321e63691378acebd609d0f581 Mon Sep 17 00:00:00 2001 From: rr- Date: Sat, 10 Sep 2016 15:28:32 +0200 Subject: [PATCH] server/errors: fix serializing errors --- server/szurubooru/rest/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/szurubooru/rest/app.py b/server/szurubooru/rest/app.py index 2c219162..2c2b70b0 100644 --- a/server/szurubooru/rest/app.py +++ b/server/szurubooru/rest/app.py @@ -107,6 +107,7 @@ def application(env, start_response): 'title': ex.title, 'description': ex.description, } - for key, value in ex.extra_fields.items(): - blob[key] = value + if ex.extra_fields is not None: + for key, value in ex.extra_fields.items(): + blob[key] = value return (_dump_json(blob).encode('utf-8'),)