From 2315e77e6d973e4fc56eb997f0fd50f4495be2a1 Mon Sep 17 00:00:00 2001 From: Brian Simpson Date: Fri, 15 Nov 2013 03:29:56 -0500 Subject: [PATCH] Raise NotFound if full name type is not thing or relation. --- r2/r2/lib/db/thing.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/r2/r2/lib/db/thing.py b/r2/r2/lib/db/thing.py index 8e31bbf31..78483445b 100644 --- a/r2/r2/lib/db/thing.py +++ b/r2/r2/lib/db/thing.py @@ -484,6 +484,8 @@ class DataThing(object): type_dict = thing_types elif real_type[0] == 'r': type_dict = rel_types + else: + raise NotFound real_type = type_dict[int(real_type[1:], 36)] thing_id = int(thing_id, 36) lookup[fullname] = (real_type, thing_id)