super() in py3

This commit is contained in:
Thomas Steen Rasmussen 2017-03-18 16:03:10 +01:00
parent 62381a50e6
commit 027e89e4ab

View file

@ -57,7 +57,7 @@ class CampRelatedModel(CreatedUpdatedModel):
messages.error(self.request, 'Camp is in read only mode.') messages.error(self.request, 'Camp is in read only mode.')
raise ValidationError('This camp is in read only mode.') raise ValidationError('This camp is in read only mode.')
super(CampRelatedModel, self).save(**kwargs) super().save(**kwargs)
def delete(self, **kwargs): def delete(self, **kwargs):
if self.camp.read_only: if self.camp.read_only:
@ -65,4 +65,4 @@ class CampRelatedModel(CreatedUpdatedModel):
messages.error(self.request, 'Camp is in read only mode.') messages.error(self.request, 'Camp is in read only mode.')
raise ValidationError('This camp is in read only mode.') raise ValidationError('This camp is in read only mode.')
super(CampRelatedModel, self).save(**kwargs) super().delete(**kwargs)