Merge pull request #3343 from volundmush/access_type

Lockfuncs are now called with an access_type kwarg in their **kwargs
This commit is contained in:
Griatch 2023-12-02 19:02:18 +01:00 committed by GitHub
commit df877c6b06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -573,7 +573,8 @@ class LockHandler:
evalstring, func_tup, raw_string = self.locks[access_type]
# execute all lock funcs in the correct order, producing a tuple of True/False results.
true_false = tuple(
bool(tup[0](accessing_obj, self.obj, *tup[1], **tup[2])) for tup in func_tup
bool(tup[0](accessing_obj, self.obj, *tup[1], access_type=access_type, **tup[2]))
for tup in func_tup
)
# the True/False tuple goes into evalstring, which combines them
# with AND/OR/NOT in order to get the final result.