fix (rooms): Handle changing iterator in open.

Uses a shallow copy of the accountability guild values.
This commit is contained in:
2021-09-23 21:10:02 +03:00
parent a8435123ac
commit 6be3d075bc

View File

@@ -66,7 +66,7 @@ async def open_next(start_time):
# Open a new slot in each accountability guild # Open a new slot in each accountability guild
to_update = [] # Cache of slot update data to be applied at the end to_update = [] # Cache of slot update data to be applied at the end
for aguild in AccountabilityGuild.cache.values(): for aguild in list(AccountabilityGuild.cache.values()):
guild = aguild.guild guild = aguild.guild
if guild: if guild:
# Initialise next TimeSlot # Initialise next TimeSlot