From 576264f9520b3ae8b698498a39f8d6b84702a112 Mon Sep 17 00:00:00 2001 From: Joel Castillo Date: Fri, 18 Mar 2016 20:38:02 -0400 Subject: [PATCH] Check privacy when adding responses to request --- public_records_portal/prr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public_records_portal/prr.py b/public_records_portal/prr.py index e1435cf0a..c8c35a707 100644 --- a/public_records_portal/prr.py +++ b/public_records_portal/prr.py @@ -1111,7 +1111,8 @@ def get_responses_chronologically(req): else: responses.append(ResponsePresenter(note=note)) for record in req.records: - responses.append(ResponsePresenter(record=record)) + if record.privacy == False: + responses.append(ResponsePresenter(record=record)) if not responses: return responses responses.sort(key=lambda x: x.date(), reverse=True)