Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only show published updates #590

Merged
merged 1 commit into from
Nov 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions fec/home/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def replace_space(string):
return string.replace(' ', '-')

def get_records(category_list=False, year=False):
records = RecordPage.objects.all()
records = RecordPage.objects.live()
if category_list != '':
for category in category_list:
records = records.filter(category=category)
Expand All @@ -23,13 +23,13 @@ def get_records(category_list=False, year=False):
return records

def get_digests(year=False):
digests = DigestPage.objects.all()
digests = DigestPage.objects.live()
if year != '':
digests = digests.filter(date__year=year)
return digests

def get_press_releases(category_list=False, year=False):
press_releases = PressReleasePage.objects.all()
press_releases = PressReleasePage.objects.live()
if category_list:
for category in category_list:
press_releases = press_releases.filter(category=category)
Expand Down