diff options
author | Filipp Lepalaan <f@230.to> | 2013-06-06 14:51:34 +0300 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-06-06 14:51:34 +0300 |
commit | 9b811ed370c6c11cca946a99c0734e9a009b5d5c (patch) | |
tree | 2e81cc5ebdbf2d04ad365686f86dc3487c38c392 /gsxws/repairs.py | |
parent | dd7cabbac2f130a5872495f6126a10fe26d7060f (diff) | |
download | py-gsxws-9b811ed370c6c11cca946a99c0734e9a009b5d5c.tar.gz py-gsxws-9b811ed370c6c11cca946a99c0734e9a009b5d5c.tar.bz2 py-gsxws-9b811ed370c6c11cca946a99c0734e9a009b5d5c.zip |
Init namespace in Repair().__init__()
Diffstat (limited to 'gsxws/repairs.py')
-rw-r--r-- | gsxws/repairs.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gsxws/repairs.py b/gsxws/repairs.py index 9d66d3f..717d8f1 100644 --- a/gsxws/repairs.py +++ b/gsxws/repairs.py @@ -54,9 +54,10 @@ class ServicePart(GsxObject): class Repair(GsxObject): "Base class for the different GSX Repair types" - _namespace = "asp:" def __init__(self, number=None, **kwargs): + + self._namespace = "asp:" super(Repair, self).__init__(**kwargs) if number is not None: @@ -243,15 +244,15 @@ class IndirectOnsiteRepair(Repair): _namespace = "asp:" def create(self): - if getattr(self, "shipTo"): # Carry-In and OnSite use different field names! + if hasattr(self, "shipTo"): # Carry-In and OnSite use different field names! self.shippingLocation = self.shipTo del(self._data['shipTo']) - if getattr(self, "poNumber"): + if hasattr(self, "poNumber"): self.purchaseOrderNumber = self.poNumber del(self._data['poNumber']) - if getattr(self, "diagnosedByTechId"): + if hasattr(self, "diagnosedByTechId"): self.technicianName = self.diagnosedByTechId del(self._data['diagnosedByTechId']) |