Skip to content

Commit

Permalink
Download tabs should list full pdf report first
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezra Peisach committed Apr 26, 2024
1 parent 1b8f243 commit b5a3d0e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion wwpdb/apps/ann_tasks_v2/webapp/CommonTasksWebAppWorker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1493,6 +1493,7 @@ def _getSessionInfoOp(self):
fList.append(fileName)
rC.set("specialpositionreportfiles", fList)

# Validation file downloads
fpattern = self._sessionPath + "/" + entryId + "_val-report*"
pthList = []
pthList = glob.glob(fpattern)
Expand All @@ -1504,8 +1505,17 @@ def _getSessionInfoOp(self):
for pth in pthList:
(_dir, fileName) = os.path.split(pth)
fList.append(fileName)
rC.set("valreportfiles", fList)

# Special handling of flist, the desire for full validation pdf to come first...
# We need to find first substring list matches, and then rest
tlist = []
for t in ["val-report-full_P1", "val-report_P1"]:
tlist += [v for v in fList if t in v]
olist = [v for v in fList if v not in tlist]

rC.set("valreportfiles", tlist + olist)

# Map files
fpattern = self._sessionPath + "/" + entryId + "_map-*"
pthList = []
pthList = glob.glob(fpattern)
Expand Down

0 comments on commit b5a3d0e

Please sign in to comment.