From a40966aa0ec719bc6854ae18d693e1d9da645c8f Mon Sep 17 00:00:00 2001 From: Etzelia Date: Fri, 18 Sep 2020 01:38:19 +0200 Subject: [PATCH] Fix Discord embeds (#59) Fix Discord embeds Reviewed-on: https://git.etztech.xyz/MMS/MinecraftManagerDjango/pulls/59 Reviewed-by: ZeroHD --- utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index 11d3716..37bab09 100644 --- a/utils.py +++ b/utils.py @@ -32,9 +32,10 @@ def build_application(application): embed.add_field(name="Age", value=application.age) embed.add_field(name="Type of Player", value=application.player_type) embed.add_field(name="Ever been banned", value=application.ever_banned) - if application.ever_banned: + if application.ever_banned and application.ever_banned_explanation: embed.add_field(name="Reason for being banned", value=application.ever_banned_explanation) - embed.add_field(name="Reference", value=application.reference) + if application.reference: + embed.add_field(name="Reference", value=application.reference) embed.add_field(name="Read the Rules", value=application.read_rules) embed.add_field(name="Date", value=application.date_display) embed.add_field(name="Status", value=application.status)