Skip to content

Commit

Permalink
CATD-361 added filters to the get_audience_devices call.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndifreke committed Mar 10, 2022
1 parent f1f9dbc commit 2a5aa16
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions livestyled/resource_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1326,14 +1326,15 @@ def get_audiences_by_external_id(

def get_audience_devices(
self,
audience: Audience or None = None
audience: Audience or None = None,
filters: Dict or None = None
) -> Generator[AudienceDevice, None, None]:
audience_filter = filters or {}

if audience:
filters = {
'audience': audience.id
}
return self._get_resource_list(AudienceDeviceSchema, filters=filters)
return self._get_resource_list(AudienceDeviceSchema)
audience_filter['audience'] = audience.id

return self._get_resource_list(AudienceDeviceSchema, filters=audience_filter)

def create_audience_device(
self,
Expand Down

0 comments on commit 2a5aa16

Please sign in to comment.