From a4dd9d3bea3dd45ade28453fe2712e7faf2b9e47 Mon Sep 17 00:00:00 2001 From: Max Patiiuk Date: Sat, 30 Nov 2024 09:14:40 -0800 Subject: [PATCH] refactor: do self-code-review --- specifyweb/specify/sp7_build_datamodel.py | 2 -- specifyweb/specify/tree_extras.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/specifyweb/specify/sp7_build_datamodel.py b/specifyweb/specify/sp7_build_datamodel.py index 1075f51c50c..1c1b8827c61 100644 --- a/specifyweb/specify/sp7_build_datamodel.py +++ b/specifyweb/specify/sp7_build_datamodel.py @@ -4,8 +4,6 @@ from django.conf import settings # type: ignore from django.utils.translation import gettext as _ -from specifyweb.specify.config import sp6_dependent_fields, sp6_system_tables - logger = logging.getLogger(__name__) TAB1 = ' ' diff --git a/specifyweb/specify/tree_extras.py b/specifyweb/specify/tree_extras.py index 3020af60c31..88e2f5d9e08 100644 --- a/specifyweb/specify/tree_extras.py +++ b/specifyweb/specify/tree_extras.py @@ -335,7 +335,7 @@ def synonymize(node, into, agent): {"tree" : "Taxon", "localizationKey" : "nodeSynonymizeToSynonymized", "node" : format_tree_node(to_save), - "parent" : format_tree_node(new_parent)}) + "parent" : format_tree_node(into)}) node.accepted_id = target.id node.isaccepted = False node.save() @@ -350,7 +350,7 @@ def synonymize(node, into, agent): {"tree" : "Taxon", "localizationKey" : "nodeSynonimizeWithChildren", "node" : format_tree_node(to_save), - "parent" : format_tree_node(new_parent)}) + "parent" : format_tree_node(into)}) node.acceptedchildren.update(**{node.accepted_id_attr().replace('_id', ''): target}) #assuming synonym can't be synonymized mutation_log(TREE_SYNONYMIZE, node, agent, node.parent,