Skip to content

Commit 41181a0

Browse files
committed
metadata_list pulls most recent, removed project text on metadata upload screen
1 parent 0517682 commit 41181a0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ingest/templates/ingest/descriptive_metadata_upload.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ <h3>Step 3 of 3: Upload metadata for associated submission</h3>
2626
{% if collections %}
2727
<ul class="list-group">
2828
<li class="list-group-item">Download and fill out either the <a href="{% static 'ingest/BILMetadataV2Template.xlsx' %}">Excel</a> or <a href="{% static '/ingest/BILMetadataV2Template.ods' %}">LibreOffice Calc</a> template. </li>
29-
<li class="list-group-item">Choose a collection, then upload your metadata.</li>.
30-
<p> If the project you are looking for is not in this list, it must be added by the PI of your project. </p>
29+
<li class="list-group-item">Choose a collection, then upload your metadata.</li>
3130
</ul>
3231
<hr>
3332
{% csrf_token %}

ingest/views.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,10 @@ def descriptive_metadata_list(request):
418418
datasets_list = []
419419
collections = Collection.objects.filter(user=request.user)
420420
for c in collections:
421-
sheets = Sheet.objects.filter(collection_id=c.id).all()
422-
for s in sheets:
423-
datasets = Dataset.objects.filter(sheet_id=s.id)
421+
sheets = Sheet.objects.filter(collection_id=c.id).last()
422+
#for s in sheets:
423+
if sheets != None:
424+
datasets = Dataset.objects.filter(sheet_id=sheets.id)
424425
for d in datasets:
425426
datasets_list.append(d)
426427

0 commit comments

Comments
 (0)