diff --git a/discord_handler/discord_handler.py b/discord_handler/discord_handler.py index 7161c38..63c1f23 100644 --- a/discord_handler/discord_handler.py +++ b/discord_handler/discord_handler.py @@ -97,7 +97,7 @@ def display_users_by_nomination(users): vote_count = film.CastVotes + film.AttendanceVotes # Surround links with <> to avoid Discord previewing the links film = ( - f" [{film.FilmName}]()" + f"[{film.FilmName}]()" if film.IMDbID is not None else film.FilmName ) diff --git a/discord_handler/test_discord_handler.py b/discord_handler/test_discord_handler.py index 3dc4b2e..819e2e8 100644 --- a/discord_handler/test_discord_handler.py +++ b/discord_handler/test_discord_handler.py @@ -306,7 +306,7 @@ def test_workflow(self): "data": { "content": "The current list of nominations are:\n" + "1. My Film Name (0 🗳) <@abc>\n" - + "2. [My Other Film]() (0 🗳) <@def>", + + "2. [My Other Film]() (0 🗳) <@def>", "flags": DiscordFlag.EPHEMERAL_FLAG, }, }, @@ -461,7 +461,7 @@ def test_workflow(self): "data": { "content": "The current list of nominations are:\n" + "1. My Film Name (1 🗳) <@abc>\n" - + "2. [My Other Film]() (0 🗳) <@def>", + + "2. [My Other Film]() (0 🗳) <@def>", "flags": DiscordFlag.EPHEMERAL_FLAG, }, }, @@ -601,7 +601,7 @@ def test_workflow(self): "type": DiscordResponse.CHANNEL_MESSAGE_WITH_SOURCE, "data": { "content": "The current list of nominations are:\n" - + "1. [My Other Film]() (1 🗳) <@def>\n" + + "1. [My Other Film]() (1 🗳) <@def>\n" + "2. [No nomination] <@abc>", "flags": DiscordFlag.EPHEMERAL_FLAG, }, @@ -751,7 +751,7 @@ def test_workflow(self): "type": DiscordResponse.CHANNEL_MESSAGE_WITH_SOURCE, "data": { "content": "The current list of nominations are:\n" - + "1. [My Other Film]() (1 🗳) <@def>\n" + + "1. [My Other Film]() (1 🗳) <@def>\n" + "2. [No nomination] <@abc>", "flags": DiscordFlag.EPHEMERAL_FLAG, },