using in_typemapper instead of self.typemapper.keys for looking up resource_uri's now

This commit is contained in:
Jesper Noehr 2009-05-08 13:45:54 +02:00
Родитель e7bf79aa6a
Коммит fd7636c4f8
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -185,8 +185,8 @@ class Emitter(object):
ret[k] = _any(getattr(data, k)) ret[k] = _any(getattr(data, k))
# resouce uri # resouce uri
if type(data) in self.typemapper.keys(): if self.in_typemapper(type(data), self.anonymous):
handler = self.typemapper.get(type(data)) handler = self.in_typemapper(type(data), self.anonymous)
if hasattr(handler, 'resource_uri'): if hasattr(handler, 'resource_uri'):
url_id, fields = handler.resource_uri() url_id, fields = handler.resource_uri()
ret['resource_uri'] = permalink( lambda: (url_id, ret['resource_uri'] = permalink( lambda: (url_id,