From 5d22e67864aa082a6ebe205f6046bc68b23dcce1 Mon Sep 17 00:00:00 2001 From: cswimr Date: Mon, 19 Aug 2024 17:53:15 -0400 Subject: [PATCH] fix(aurora): don't mutate a list while iterating through it --- aurora/utilities/factory.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aurora/utilities/factory.py b/aurora/utilities/factory.py index c5222d5..319de3f 100644 --- a/aurora/utilities/factory.py +++ b/aurora/utilities/factory.py @@ -270,13 +270,14 @@ async def changes_factory(interaction: Interaction, moderation: Moderation) -> E f"{bold('End Timestamp:')} {end_timestamp}" if end_timestamp else "", f"{bold('Timestamp')} {timestamp}", ] + copy = change_str.copy() for string in change_str: if string == "": - change_str.remove(string) + copy.remove(string) embed.add_field( name=change.type.title(), - value="\n".join(change_str), + value="\n".join(copy), inline=False, )