diff options
Diffstat (limited to 'app/dispatch')
| -rw-r--r-- | app/dispatch/misc.py | 3 | ||||
| -rw-r--r-- | app/dispatch/views.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/dispatch/misc.py b/app/dispatch/misc.py index c1d100a..d876cfd 100644 --- a/app/dispatch/misc.py +++ b/app/dispatch/misc.py @@ -64,7 +64,8 @@ def zip_attachments_for_loads(loads, pre_append, date): ext = '.pdf' # Get the name for the zip file - zipname = l.description + '-' + l.user.identity.name + ext + zipname = l.description + ' - ' + l.delivered_to + ' - ' + \ + l.user.identity.name + ext zipname = get_valid_filename(zipname) z.write(p.document.path, zipname) diff --git a/app/dispatch/views.py b/app/dispatch/views.py index 1042d67..2aa82f5 100644 --- a/app/dispatch/views.py +++ b/app/dispatch/views.py @@ -473,7 +473,8 @@ def PaperworkDownload(request, load_id, pk): print(e) ext = '.pdf' - filename = get_valid_filename(load.description + ext) + filename = get_valid_filename(load.description + " - " + \ + load.delivered_to + ext) response = HttpResponse( fh.read(), |
