Skip to content

Commit 0086006

Browse files
Luke TuiteLuke Tuite
authored andcommitted
Previous commit was dumb logic, this should work just fine. Looks kind of janky but works as intended
1 parent b5609bd commit 0086006

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

ingest/views.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -938,11 +938,9 @@ def collection_detail(request, pk):
938938
def ondemandSubmission(request, pk):
939939
coll = Collection.objects.get(id = pk)
940940
if coll.submission_status == 'SUCCESS' and coll.validation_status == 'SUCCESS':
941-
sheet = Sheet.objects.filter(collection_id=coll.id).last()
942-
print(sheet)
943-
ds = Dataset.objects.filter(sheet = sheet.id).last()
944-
p = ds.bildirectory
945-
path = p[:33]
941+
first2 = coll.bil_uuid[:2]
942+
second2 = coll.bil_uuid[2:4]
943+
path = '/bil/data/' + first2 + '/' + second2 + '/' + coll.bil_uuid + '/'
946944
else:
947945
path = coll.data_path
948946
od = 'https://ondemand.bil.psc.edu/pun/sys/dashboard/files/fs' + path

0 commit comments

Comments
 (0)