Avoid error when trying to reset deadline for no msgbox entries

Closes #4520.
This commit is contained in:
Lonami
2024-12-22 15:07:35 +01:00
committed by GitHub
parent b09c8c83f7
commit cfce68e9ad

View File

@@ -295,6 +295,8 @@ class MessageBox:
# #
# It also updates the next deadline time to reflect the new closest deadline. # It also updates the next deadline time to reflect the new closest deadline.
def reset_deadlines(self, entries, deadline): def reset_deadlines(self, entries, deadline):
if not entries:
return
for entry in entries: for entry in entries:
if entry not in self.map: if entry not in self.map:
raise RuntimeError('Called reset_deadline on an entry for which we do not have state') raise RuntimeError('Called reset_deadline on an entry for which we do not have state')