aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws
diff options
context:
space:
mode:
Diffstat (limited to 'gsxws')
-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'])