Create parallel Player/Account fields and copy all
This commit is contained in:
parent
ee0e9cc053
commit
63c96de443
10 changed files with 226 additions and 2 deletions
|
|
@ -24,8 +24,8 @@ class SharedMemoryManager(Manager):
|
|||
if key.endswith('__exact'):
|
||||
key = key[:-len('__exact')]
|
||||
if key in ('pk', self.model._meta.pk.attname):
|
||||
inst = self.model.get_cached_instance(kwargs[items[0]])
|
||||
try:
|
||||
inst = self.model.get_cached_instance(kwargs[items[0]])
|
||||
# we got the item from cache, but if this is a fk, check it's ours
|
||||
if getattr(inst, str(self.field).split(".")[-1]) != self.instance:
|
||||
inst = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue