exceptions adding in closed elements

This commit is contained in:
Maxime Réaux 2026-02-13 15:44:28 +01:00
parent 88bd28e949
commit a2b6c7c684
10 changed files with 179 additions and 82 deletions

View file

@ -238,6 +238,8 @@ class War:
if self.is_over:
raise ForbiddenOperation("Can't update campaign in a closed war.")
camp = self.get_campaign(campaign_id)
if camp.is_over:
raise ForbiddenOperation("Can't update a closed campaign.")
camp.set_name(name)
camp.set_month(month)