Skip to content

Commit 57e5f80

Browse files
committed
make sure an http client instance is passed when returning fetched/created objects from microclients
1 parent 484b10a commit 57e5f80

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

identify/microclients/attribute_microclient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def list(self, traffic_type_id):
5757
self._endpoint['all_items'],
5858
trafficTypeId=traffic_type_id
5959
)
60-
return [Attribute(item) for item in response]
60+
return [Attribute(item, self._http_client) for item in response]
6161
except HTTPResponseError as e:
6262
LOGGER.error('Error retrieving items')
6363
raise e

identify/microclients/environment_microclient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def list(self):
3434
response = self._http_client.make_request(
3535
self._endpoint['all_items']
3636
)
37-
return [Environment(item) for item in response]
37+
return [Environment(item, self._http_client) for item in response]
3838
except HTTPResponseError as e:
3939
LOGGER.error('Error retrieving items')
4040
raise e

identify/microclients/traffic_type_microclient.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ class TrafficTypeMicroClient:
1919
'query_string': [],
2020
'response': True,
2121
},
22-
# 'fetch_attributes': Attribute._endpoint['all_items'],
23-
# 'add_attribute': Attribute._endpoint['create']
2422
}
2523

2624
def __init__(self, http_client):
@@ -36,7 +34,7 @@ def list(self):
3634
response = self._http_client.make_request(
3735
self._endpoint['all_items']
3836
)
39-
return [TrafficType(item) for item in response]
37+
return [TrafficType(item, self._http_client) for item in response]
4038
except HTTPResponseError as e:
4139
LOGGER.error('Error retrieving items')
4240
raise e

0 commit comments

Comments
 (0)