Skip to content

Commit

Permalink
Merge pull request #66 from realifetech/feature/CATD-361-campaign-aut…
Browse files Browse the repository at this point in the history
…omation---add-suppo

CATD-361 added filters to the get_audience_devices call.
  • Loading branch information
ndy40 committed Mar 10, 2022
2 parents f1f9dbc + 2a5aa16 commit bb44ffa
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 bb44ffa

Please sign in to comment.