This commit is contained in:
Kenneth Reitz
2013-03-31 15:49:30 +03:00
parent 727c7ee314
commit d7a73de9b2
+2 -4
View File
@@ -224,10 +224,8 @@ class Record(object):
@classmethod
def _from_uuid(cls, uuid, collection=None):
if collection:
uuid = '{}/{}'.format(collection, uuid)
else:
collection = uuid.split('/')[0]
if collection is None:
collection, uuid = uuid.split('/', 2)
result = ES.get(collection, 'record', uuid)['_source']