_redis_name wasn't picking up override_type correctly, and _redis_key wasn't using it

This commit is contained in:
Justin Santa Barbara 2010-07-16 18:33:46 +00:00
parent 67d4e16a8c
commit 4e2fdcb6e8

View File

@ -105,7 +105,7 @@ class BasicModel(object):
@classmethod
def _redis_name(cls):
return self.override_type or cls.__name__
return cls.override_type or cls.__name__
@classmethod
def lookup(cls, identifier):
@ -147,7 +147,7 @@ class BasicModel(object):
@property
def __redis_key(self):
return '%s:%s' % (self.__class__.__name__.lower(), self.identifier)
return '%s:%s' % (self._redis_name(), self.identifier)
def __repr__(self):
return "<%s:%s>" % (self.__class__.__name__, self.identifier)