add camp title to error message because what the fuck

This commit is contained in:
Thomas Steen Rasmussen 2020-08-11 10:34:38 +02:00
parent 64b8f0ee10
commit 5c4421d41b

View file

@ -63,8 +63,8 @@ class CampRelatedModel(CreatedUpdatedModel):
def save(self, **kwargs): def save(self, **kwargs):
if self.camp.read_only: if self.camp.read_only:
if hasattr(self, "request"): if hasattr(self, "request"):
messages.error(self.request, "Camp is in read only mode.") messages.error(self.request, f"Camp {self.camp} is in read only mode.")
raise CampReadOnlyModeError("This camp is in read only mode.") raise CampReadOnlyModeError(f"The camp {self.camp} is in read only mode.")
super().save(**kwargs) super().save(**kwargs)