From 28de2a3676a0dc17808f040a9dd4efeee686a9e7 Mon Sep 17 00:00:00 2001 From: Viktor Kovtun <viktor.kovtun@id.ethz.ch> Date: Fri, 20 Aug 2021 15:57:33 +0200 Subject: [PATCH] SSDM-11382 Fixing a possible source of error in the integration-tests Jenkins build. --- pybis/src/python/pybis/pybis.py | 39 +++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/pybis/src/python/pybis/pybis.py b/pybis/src/python/pybis/pybis.py index 85b9e439f42..b0732ff1426 100644 --- a/pybis/src/python/pybis/pybis.py +++ b/pybis/src/python/pybis/pybis.py @@ -3399,27 +3399,32 @@ class Openbis: "@type": "as.dto.semanticannotation.search.SemanticAnnotationSearchCriteria" } ) - attrs = [ - "permId", - "entityType", - "propertyType", - "predicateOntologyId", - "predicateOntologyVersion", - "predicateAccessionId", - "descriptorOntologyId", - "descriptorOntologyVersion", - "descriptorAccessionId", - "creationDate", - ] - if len(objects) == 0: - annotations = DataFrame(columns=attrs) - else: - annotations = DataFrame(objects) + + def create_data_frame(attrs, props, response): + attrs = [ + "permId", + "entityType", + "propertyType", + "predicateOntologyId", + "predicateOntologyVersion", + "predicateAccessionId", + "descriptorOntologyId", + "descriptorOntologyVersion", + "descriptorAccessionId", + "creationDate", + ] + if len(objects) == 0: + annotations = DataFrame(columns=attrs) + else: + annotations = DataFrame(objects) + return annotations[attrs] + return Things( openbis_obj=self, entity="semantic_annotation", - df=annotations[attrs], identifier_name="permId", + objects=objects, + df_initializer=create_data_frame ) def get_semantic_annotation(self, permId, only_data=False): -- GitLab