Skip to content
Merged
Show file tree
Hide file tree
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
21 changes: 11 additions & 10 deletions LIMS2DB/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,16 +725,17 @@ def get_library_preps(self, sample):
except IndexError:
self.log.info(f"No libstart found for sample {sample.name}")
if str(one_libprep.typeid) in list(pc_cg.WORKSET.keys()):
if (
"first_prep_start_date" not in self.obj["samples"][sample.name]
or datetime.strptime(
self.obj["samples"][sample.name]["first_prep_start_date"],
"%Y-%m-%d",
)
> one_libprep.daterun
):
self.obj["samples"][sample.name]["first_prep_start_date"] = one_libprep.daterun.strftime("%Y-%m-%d")
self.obj["samples"][sample.name]["library_prep"][prepname]["prep_start_date"] = one_libprep.daterun.strftime("%Y-%m-%d")
if one_libprep.daterun:
if (
"first_prep_start_date" not in self.obj["samples"][sample.name]
or datetime.strptime(
self.obj["samples"][sample.name]["first_prep_start_date"],
"%Y-%m-%d",
)
> one_libprep.daterun
):
self.obj["samples"][sample.name]["first_prep_start_date"] = one_libprep.daterun.strftime("%Y-%m-%d")
self.obj["samples"][sample.name]["library_prep"][prepname]["prep_start_date"] = one_libprep.daterun.strftime("%Y-%m-%d")
pend = get_children_processes(
self.session,
one_libprep.processid,
Expand Down
2 changes: 1 addition & 1 deletion scripts/project_summary_upload_LIMS.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def masterProcess(options, projectList, mainlims, logger, oconf=None):
logger.info("ordering the project list")
orderedprojectlist = sorted(
projectList,
key=lambda x: (mainlims.get_sample_number(projectname=x.name)),
key=lambda x: mainlims.get_sample_number(projectname=x.name),
reverse=True,
)
logger.info("done ordering the project list")
Expand Down