File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -493,9 +493,9 @@ def list_details(request, prefix):
493
493
raise Http404 ('Organisation list {} does not exist' .format (prefix ))
494
494
return render (request , 'list.html' , context = {'org_list' : org_list , 'branch' :use_branch })
495
495
496
- def _get_filename ():
497
- if git_commit_ref :
498
- return git_commit_ref [:10 ]
496
+ def _get_filename (use_branch = 'master' ):
497
+ if git_commit_ref [ use_branch ] :
498
+ return git_commit_ref [use_branch ][ :10 ]
499
499
else :
500
500
return datetime .datetime .now ().strftime ("%Y%m%d%H%M%S" )
501
501
@@ -540,7 +540,7 @@ def csv_download(request):
540
540
541
541
response = HttpResponse (output .getvalue (), content_type = 'text/csv' )
542
542
543
- response ['Content-Disposition' ] = 'attachment; filename="org-id-{0}.csv"' .format (_get_filename ())
543
+ response ['Content-Disposition' ] = 'attachment; filename="org-id-{0}.csv"' .format (_get_filename (use_branch ))
544
544
return response
545
545
546
546
You can’t perform that action at this time.
0 commit comments