diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/tracking.py | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/modules/tracking.py b/modules/tracking.py index 5d10a24..89e3d49 100644 --- a/modules/tracking.py +++ b/modules/tracking.py @@ -160,20 +160,15 @@ class Module: for row in consignments: i = 0 if row.label: - label_header = True - results.append('Packages for \002%s\002:' % row.label) + label = ' (%s)' % row.label else: - label_header = False + label = '' + for package in row.packages: i += 1 date = package.last desc = package.status - if package.code == row.code and row.label: - label = ' (%s)' % row.label - else: - label = '' - if date and desc: s = '\002%s\002%s %s - %s' % (package.code, label, date, desc) else: @@ -182,16 +177,8 @@ class Module: results.append(s) if i == 0: - if row.label: - label = ' (%s)' % row.label - else: - label = '' results.append('No packages found for \002%s\002%s' % (row.code, label)) - if label_header: - del results[0] - label_header = False - if len(results): msg = results else: |