From c4450a927553e803610c1f687012d50a218936e7 Mon Sep 17 00:00:00 2001 From: vermeul <swen@ethz.ch> Date: Tue, 1 Oct 2019 14:36:14 +0200 Subject: [PATCH] get sample type before using it in method call --- pybis/src/python/pybis/pybis.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pybis/src/python/pybis/pybis.py b/pybis/src/python/pybis/pybis.py index 117624f4781..fc2273f781e 100644 --- a/pybis/src/python/pybis/pybis.py +++ b/pybis/src/python/pybis/pybis.py @@ -3353,7 +3353,8 @@ class Openbis: if 'collection' in kwargs: kwargs['experiment'] = kwargs['collection'] kwargs.pop('collection', None) - return Sample(self, type=self.get_sample_type(type), project=project, data=None, props=props, **kwargs) + sample_type = self.get_sample_type(type) + return Sample(self, type=sample_type, project=project, data=None, props=props, **kwargs) new_object = new_sample # Alias -- GitLab