Raise NotFound if full name type is not thing or relation.

This commit is contained in:
Brian Simpson
2013-11-15 03:29:56 -05:00
parent d2d325ce7f
commit 2315e77e6d

View File

@@ -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)