self() lock function now works when a db object is passed.

This commit is contained in:
Daniel Benoy 2013-07-16 20:22:39 -04:00
parent 261e463505
commit b93a9b4487

View file

@ -117,7 +117,7 @@ def self(accessing_obj, accessed_obj, *args, **kwargs):
This can be used to lock specifically only to This can be used to lock specifically only to
the same object that the lock is defined on. the same object that the lock is defined on.
""" """
return accessing_obj == accessed_obj return accessing_obj.typeclass == accessed_obj.typeclass
def perm(accessing_obj, accessed_obj, *args, **kwargs): def perm(accessing_obj, accessed_obj, *args, **kwargs):