refactor(access): cache object so it doesnt have to be called multiple times

!18
This commit is contained in:
2024-06-05 23:42:34 +09:30
parent 2c1bbbfc15
commit 6650434c63

View File

@ -27,11 +27,12 @@ class OrganizationMixin():
if hasattr(self, 'get_object'):
self.get_object()
id = self.get_object().get_organization().id
obj = self.get_object()
if self.get_object().is_global:
id = obj.get_organization().id
if obj.is_global:
id = 0