Don't crash when getting unknown collections

Fix #422.
This commit is contained in:
Guillaume Ayoub
2016-07-14 01:39:57 +02:00
parent 4c91ee8906
commit 5bd80d8d13
2 changed files with 6 additions and 1 deletions

View File

@@ -409,7 +409,10 @@ class Application:
else:
# Get whole collection
answer = collection.serialize()
etag = collection.etag
if answer is None:
return client.NOT_FOUND, {}, None
else:
etag = collection.etag
if answer:
headers = {