From 491d967f2e0d6fc62724746a430fe27a9421e639 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 14 Aug 2015 15:49:05 +0300 Subject: Return symptoms and issues as two-tuples --- gsxws/repairs.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gsxws') diff --git a/gsxws/repairs.py b/gsxws/repairs.py index b7716ae..d84372c 100644 --- a/gsxws/repairs.py +++ b/gsxws/repairs.py @@ -54,9 +54,20 @@ class SymptomIssue(GsxObject): _namespace = "asp:" def fetch(self): + result = [] self._submit("requestData", "ReportedSymptomIssue", "ReportedSymptomIssueResponse") - return self._req.objects.reportedSymptomIssueResponse + r = self._req.objects.reportedSymptomIssueResponse + + if r.symptoms is not None: + for s in r.symptoms: + result.append((s.reportedSymptomCode, s.reportedSymptomDesc,)) + + if r.issues is not None: + for s in r.issues: + result.append((s.reportedIssueCode, s.reportedIssueDesc,)) + + return result class CompTiaCode(GsxObject): -- cgit v1.2.3