Skip to content

Commit

Permalink
Merge pull request #769 from uktrade/develop
Browse files Browse the repository at this point in the history
Staging release
  • Loading branch information
richtier authored Jan 29, 2020
2 parents 4178490 + 8c5c0b1 commit 007c1ac
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Pre-release

### Implemented enhancements
- No ticket - Fix markets page draft results bug

## [2020.01.20](https://github.com/uktrade/directory-cms/releases/tag/2020.01.20)
[Full Changelog](https://github.com/uktrade/directory-cms/compare/2020.01.09...2020.01.20)

Expand Down
2 changes: 1 addition & 1 deletion export_readiness/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def cache_key(self):
return f'countryguide_{industry}{region}'

def get_queryset(self):
queryset = models.CountryGuidePage.objects.all()
queryset = models.CountryGuidePage.objects.filter(live=True)
industry = self.request.query_params.get('industry')
region = self.request.query_params.get('region')
if not industry and not region:
Expand Down
3 changes: 3 additions & 0 deletions tests/export_readiness/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ def test_lookup_market_guides_all_filters_no_cache(client):
market1.tags = [tag]
market1.save()
factories.CountryGuidePageFactory(country=country)
market2 = factories.CountryGuidePageFactory(country=country, live=False) # draft
market2.tags = [tag]
market2.save()
url = reverse('api:lookup-country-guides-list-view')

response = client.get(f'{url}?industry={tag.name}&region={region.name}')
Expand Down

0 comments on commit 007c1ac

Please sign in to comment.