From 7cc2adbcf5c4774617315f026eec856afe323bb8 Mon Sep 17 00:00:00 2001
From: vermeul <swen@ethz.ch>
Date: Tue, 12 Mar 2019 17:00:27 +0100
Subject: [PATCH] allow get_object and get_objects as aliases

---
 pybis/src/python/pybis/space.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pybis/src/python/pybis/space.py b/pybis/src/python/pybis/space.py
index 01a1c0e548f..8768c635aa9 100644
--- a/pybis/src/python/pybis/space.py
+++ b/pybis/src/python/pybis/space.py
@@ -37,7 +37,7 @@ class Space(OpenBisObject):
     def get_samples(self, **kwargs):
         return self.openbis.get_samples(space=self.code, **kwargs)
 
-    get_objects = get_samples #Alias
+    get_objects = get_samples  # Alias
 
     def get_sample(self, sample_code, project_code=None):
         if is_identifier(sample_code) or is_permid(sample_code):
@@ -47,6 +47,7 @@ class Space(OpenBisObject):
                 return self.openbis.get_sample('/{}/{}'.format(self.code,sample_code) )
             else:
                 return self.openbis.get_sample('/{}/{}/{}'.format(self.code, project_code, sample_code) )
+    get_object = get_sample  # Alias
 
 
     def get_projects(self, **kwargs):
-- 
GitLab