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

- simplify

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41234 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f7e527fe
No related merge requests found
......@@ -232,14 +232,9 @@ class SlapTool(BaseTool):
"Load the given xml as configuration for the computer object"
self._loginAsSuperUser()
computer_dict = xml_marshaller.xml_marshaller.loads(xml)
try:
computer = self._getComputerDocument(computer_dict['reference'])
except Unauthorized:
return 'Bad reference'
if computer.Computer_loadComputerPartitionsFromDictionnary(computer_dict):
return 'Configuration properly registered'
return 'Problem occured during the configuration registration'
computer.Computer_loadComputerPartitionsFromDictionnary(computer_dict)
return 'Content properly posted.'
security.declarePublic('useComputerPartition')
def useComputerPartition(self, computer_id, computer_partition_id, use_string):
......
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