Anton Shestakov <engored@ya.ru>, Fri, 11 Jan 2013 00:27:32 +0900
Return 404 in case of RecordDeleted exception (which, apparently, is different enough from RecordNotFound).
--- a/app.py Wed Jan 09 11:46:15 2013 +0900
+++ b/app.py Fri Jan 11 00:27:32 2013 +0900
from flask import Flask, g, request, render_template
from flask.ext.restful import Resource, Api
-from CodernityDB.database import RecordNotFound
+from CodernityDB.database import RecordNotFound, RecordDeleted
from CodernityDB.database_thread_safe import ThreadSafeDatabase
from fruitbar.indexes import ProjectIndex, TaskIndex
if doc['workspace'] != workspace:
+ except (RecordNotFound, RecordDeleted):
if doc['workspace'] != workspace:
+ except (RecordNotFound, RecordDeleted):
userdata = dict((k, v) for (k, v) in request.json.items() if k in self.safe_fields)
if doc['workspace'] != workspace:
+ except (RecordNotFound, RecordDeleted):