Skip to content

Commit

Permalink
Merge pull request #23 from Mengesh/main
Browse files Browse the repository at this point in the history
fix: Fixed incorrect filtering of subscribers
  • Loading branch information
igorhrcek authored Feb 2, 2024
2 parents 5d7d3d8 + 9135e52 commit c34983b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mailerlite/sdk/subscribers.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ def list(self, **kwargs):
for key, val in params["kwargs"].items():
if key not in available_params:
raise TypeError("Got an unknown argument '%s'" % key)
query_params[key] = val
if key == "filter":
for filter_key, filter_value in val.items():
query_params[f"filter[{filter_key}]"] = filter_value
else:
query_params[key] = val

return self.api_client.request("GET", self.base_api_url, query_params).json()

Expand Down

0 comments on commit c34983b

Please sign in to comment.