From 9703208f48228ce57e0198e7f3039ab11ba5142e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20K=C3=BChn?= <17148798+JOKUE2002@users.noreply.github.com> Date: Wed, 30 Oct 2024 15:33:12 +0100 Subject: [PATCH] Show display_name in export if user is owner --- bitpoll/poll/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitpoll/poll/views.py b/bitpoll/poll/views.py index 71675a5..f990b05 100644 --- a/bitpoll/poll/views.py +++ b/bitpoll/poll/views.py @@ -161,7 +161,7 @@ def poll(request, poll_url: str, export: bool=False): row.extend(a) writer.writerow(row) for vote, votechoices in zip(poll_votes, vote_choice_matrix): - row = [vote.display_name if not current_poll.hide_participants else _('Hidden')] + row = [vote.display_name if not (current_poll.hide_participants and current_poll.current_user_is_owner(request)) else _('Hidden')] row.append(vote.date_created.isoformat(timespec='seconds')) row.extend([choice['value'].title if choice and choice['value'] else '' for choice in votechoices]) writer.writerow(row)