~fabrixxm/lesanaweb

2bd682cff5ae7c46e0d2d3fc28695751479e5c4d — fabrixxm 1 year, 1 month ago 272be3c
Return "400 Bad Request" on not unique eid
1 files changed, 1 insertions(+), 1 deletions(-)

M app.py
M app.py => app.py +1 -1
@@ 60,7 60,7 @@ def search():
def entry(eid):
    entries = collection.entries_from_short_eid(eid)
    if len(entries) > 1:
        abort(500, "{} is not an unique eid".format(eid))
        abort(400, "{} is not an unique eid".format(eid))
    if not entries:
        abort(404, "Could not find an entry with eid starting with: {}".format(
            eid