Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions LIMS2DB/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,18 +947,16 @@ def get_library_preps(self, sample):
# If only Aggregate QC step exists, use it even if it's a pool
if len(agrlibvals) == 1:
agrlibval = agrlibvals[0]
query += f"{agrlibval.processid}"
try:
inp_artifact = self.session.query(Artifact).from_statement(text(query)).first()
inp_artifact = self.session.query(Artifact).from_statement(text(query + f"{agrlibval.processid}")).first()
except NoResultFound:
pass
else:
for agrlv in agrlibvals:
# for small rna (and maybe others), there is more than one agrlibval, and I should not get the latest one,
# but the latest one that ran at sample level, not a pool level.
query += f"{agrlv.processid}"
try:
inp_artifact = self.session.query(Artifact).from_statement(text(query)).first()
inp_artifact = self.session.query(Artifact).from_statement(text(query + f"{agrlv.processid}")).first()

# We want the QC results of individual sample, not library pool
if (
Expand Down