aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws/repairs.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-06-06 14:51:34 +0300
committerFilipp Lepalaan <f@230.to>2013-06-06 14:51:34 +0300
commit9b811ed370c6c11cca946a99c0734e9a009b5d5c (patch)
tree2e81cc5ebdbf2d04ad365686f86dc3487c38c392 /gsxws/repairs.py
parentdd7cabbac2f130a5872495f6126a10fe26d7060f (diff)
downloadpy-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.py9
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'])