Add more precautions when trying to get SR URI

parent 29bc7186
...@@ -490,7 +490,7 @@ class ComputerPartition(SlapDocument): ...@@ -490,7 +490,7 @@ class ComputerPartition(SlapDocument):
""" """
Returns the software release associate to the computer partition. Returns the software release associate to the computer partition.
""" """
if self._software_release_document is None: if not getattr(self, '_software_release_document', None):
raise NotFoundError("No software release information for partition %s" % raise NotFoundError("No software release information for partition %s" %
self.getId()) self.getId())
else: else:
......
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