Skip to content

Commit

Permalink
Merge pull request #33 from cloudblue/LITE-27467-fix-filters
Browse files Browse the repository at this point in the history
LITE-27467: fixed product and marketplace filters tier config request report
  • Loading branch information
Francesco Faraone authored May 16, 2023
2 parents 524da79 + 57a0744 commit 117a5a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions reports/tier_configuration_requests/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ def _get_requests(client, parameters):
query &= R().events.created.at.le(parameters['date']['before'])

if parameters.get('product') and parameters['product']['all'] is False:
query &= R().product.id.oneof(parameters['product']['choices'])
query &= R().configuration.product.id.oneof(parameters['product']['choices'])
if parameters.get('mkp') and parameters['mkp']['all'] is False:
query &= R().marketplace.id.oneof(parameters['mkp']['choices'])
query &= R().configuration.marketplace.id.oneof(parameters['mkp']['choices'])
if parameters.get('rr_type') and parameters['rr_type']['all'] is False:
query &= R().type.oneof(parameters['rr_type']['choices'])
if parameters.get('rr_status') and parameters['rr_status']['all'] is False:
Expand Down
3 changes: 2 additions & 1 deletion tests/test_tier_configuration_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ def test_generate_all_params(progress, client_factory, response_factory, tcr_req
responses.append(
response_factory(
query='and(ge(events.created.at,2020-12-01T00:00:00),le(events.created.at,'
'2021-01-01T00:00:00),in(product.id,(PRD-1)),in(marketplace.id,(MKP-1)),'
'2021-01-01T00:00:00),in(configuration.product.id,(PRD-1)),'
'in(configuration.marketplace.id,(MKP-1)),'
'in(type,(setup)),in(status,(pending)))',
value=[tcr_request],
),
Expand Down

0 comments on commit 117a5a1

Please sign in to comment.