policies: fix obj not being set

This commit is contained in:
Jens Langhammer 2020-12-31 11:16:01 +01:00
parent 3584bdf530
commit 68b9c34f78

View file

@ -56,6 +56,7 @@ class PolicyEngine:
raise ValueError(f"{pbm} is not instance of PolicyBindingModel")
self.__pbm = pbm
self.request = PolicyRequest(user)
self.request.obj = pbm
if request:
self.request.http_request = request
self.__cached_policies = []