From 77bba480d43f94613deb1ef454f56576d89e27cc Mon Sep 17 00:00:00 2001
From: vermeul <swen@ethz.ch>
Date: Tue, 12 Jan 2021 11:06:25 +0100
Subject: [PATCH] fixed vocabularies bug

---
 pybis/src/python/pybis/pybis.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pybis/src/python/pybis/pybis.py b/pybis/src/python/pybis/pybis.py
index 6fd9e32bd9b..ff9ce97d18d 100644
--- a/pybis/src/python/pybis/pybis.py
+++ b/pybis/src/python/pybis/pybis.py
@@ -2744,7 +2744,10 @@ class Openbis:
         else:
             parse_jackson(resp)
             for ident in resp:
-                vocabulary = Vocabulary( openbis_obj=self, data=resp[ident])
+                data = resp[ident]
+                if only_data:
+                    return data
+                vocabulary = Vocabulary( openbis_obj=self, data=data)
                 if self.use_cache:
                     self._object_cache(entity='vocabulary', code=code, value=vocabulary)
                 return vocabulary
-- 
GitLab