From 30595fec0bcf2fc8ff673b10eb50159b956a4be8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com>
Date: Mon, 20 Feb 2023 12:11:03 +0100
Subject: [PATCH] MAINT: use list instead of _Parents

In `has_parent` (the only place where `get_parents_recursively` is
called in `models.py`), the `parents` variable is sometimes a list any
ways.
---
 src/caosdb/common/models.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/caosdb/common/models.py b/src/caosdb/common/models.py
index 9042cdf2..65e0f189 100644
--- a/src/caosdb/common/models.py
+++ b/src/caosdb/common/models.py
@@ -700,18 +700,18 @@ out: List[Entity]
   The parents of this Entity
 """
 
-        all_parents = _Parents()
+        all_parents = []
         self._get_parent_recursively(all_parents, retrieve=retrieve)
 
         return all_parents
 
-    def _get_parent_recursively(self, all_parents, retrieve: bool = True):
+    def _get_parent_recursively(self, all_parents: list, retrieve: bool = True):
         """Get all ancestors with a little helper.
 
         As a side effect of this method, the ancestors are added to
         all_parents.
 
-        @param all_parents: The added parents so far.
+        @param all_parents: list, The added parents so far.
 
         @return: None, but see side effects.
         """
-- 
GitLab