mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX] Travis request user active proeperties
This commit is contained in:
@@ -33,7 +33,10 @@ class ResUsers(models.Model):
|
|||||||
def get_active_property_ids(self):
|
def get_active_property_ids(self):
|
||||||
# TODO: Require performance test and security
|
# TODO: Require performance test and security
|
||||||
# checks (Review lazy_property decorator?)
|
# checks (Review lazy_property decorator?)
|
||||||
|
if request:
|
||||||
active_property_ids = list(
|
active_property_ids = list(
|
||||||
map(int, request.httprequest.cookies.get("pms_pids", "").split(","))
|
map(int, request.httprequest.cookies.get("pms_pids", "").split(","))
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
active_property_ids = self.env.user.pms_property_ids.ids
|
||||||
return active_property_ids
|
return active_property_ids
|
||||||
|
|||||||
Reference in New Issue
Block a user