From 7cad0be8eec8bccc55ec45b59e41ba8f12a91b86 Mon Sep 17 00:00:00 2001 From: Khoroshevskyi Date: Thu, 11 Jul 2024 13:49:20 -0400 Subject: [PATCH] fixed bug on sample deletion --- pepdbagent/modules/sample.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pepdbagent/modules/sample.py b/pepdbagent/modules/sample.py index 9f39760..90e216b 100644 --- a/pepdbagent/modules/sample.py +++ b/pepdbagent/modules/sample.py @@ -313,7 +313,7 @@ def delete( parent_mapping = sample_mapping.parent_mapping child_mapping = sample_mapping.child_mapping session.delete(sample_mapping) - if parent_mapping: + if child_mapping: child_mapping.parent_mapping = parent_mapping project_mapping.number_of_samples -= 1 project_mapping.last_update_date = datetime.datetime.now(datetime.timezone.utc)