Commit b2de7b91 authored by Łukasz Nowak's avatar Łukasz Nowak

Avoid accessing object just to fetch its uid.

parent 7e26d1d2
...@@ -1154,7 +1154,9 @@ class SlapTool(BaseTool): ...@@ -1154,7 +1154,9 @@ class SlapTool(BaseTool):
@UnrestrictedMethod @UnrestrictedMethod
def _getComputerUidByReference(self, computer_reference): def _getComputerUidByReference(self, computer_reference):
return self._getComputerDocument(computer_reference).getUid() return self.getPortalObject().portal_catalog.unrestrictedSearchResults(
portal_type='Computer', reference=computer_reference,
validation_state="validated")[0].UID
def _getComputerPartitionDocument(self, computer_reference, def _getComputerPartitionDocument(self, computer_reference,
computer_partition_reference): computer_partition_reference):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment