Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Fixing another bug with non-id primary keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Arcangeli committed Nov 28, 2013
1 parent 923cc98 commit d08aa49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stdnet/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def ping(self):

def instance_keys(self, obj):
'''Return a list of database keys used by instance *obj*'''
return [self.basekey(obj._meta, obj.id)]
return [self.basekey(obj._meta, obj.pkvalue())]

def auto_id_to_python(self, value):
'''Return a proper python value for the auto id.'''
Expand Down
2 changes: 1 addition & 1 deletion stdnet/backends/redisb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ def model_keys(self, meta):

def instance_keys(self, obj):
meta = obj._meta
keys = [self.basekey(meta, OBJ, obj.id)]
keys = [self.basekey(meta, OBJ, obj.pkvalue())]
for field in meta.multifields:
f = getattr(obj, field.attname)
be = self.structure(f)
Expand Down

0 comments on commit d08aa49

Please sign in to comment.