Commit 58fa9205 authored by Daniel Bacher's avatar Daniel Bacher

add option ad_details

parent d866ae7c
......@@ -122,8 +122,10 @@ class RestClient(object):
path = '/oe/name/{pk}'.format(pk=pk)
return self.get(path)
def get_oe_groups(self, pk, pk_only=False):
def get_oe_groups(self, pk, pk_only=False, ad_details=False):
path = '/groups/{pk}'.format(pk=pk)
if ad_details:
path += "?addAdDetails=true"
l = self.get(path)
if pk_only:
l = [d[SYMBOLS['GROUP_PK_ATTRIB']] for d in l]
......
......@@ -105,9 +105,9 @@ class Oe(Model):
def _save_data_attribs(self):
raise NotImplementedError('Not supported')
def get_groups(self):
def get_groups(self, ad_details=False):
self.load()
l = self.client.get_oe_groups(pk=self.pk)
l = self.client.get_oe_groups(pk=self.pk, ad_details=ad_details)
for d in l:
y = Group(client=self.client, data=d)
yield y
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment