From d7a73de9b2f8ea0fe0cf84d6a80895547b84f2d4 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 31 Mar 2013 15:49:30 +0300 Subject: [PATCH] fixes --- elephant.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/elephant.py b/elephant.py index d9801a3..dad1bdb 100644 --- a/elephant.py +++ b/elephant.py @@ -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']