dont add changes to finished changesets

This commit is contained in:
Laura Klünder 2017-06-12 15:06:51 +02:00
parent 7f4c917872
commit b4c640254f

View file

@ -148,4 +148,6 @@ class Change(models.Model):
self.full_clean()
if self.pk is not None:
raise ValidationError('change objects can not be edited.')
if self.changeset.proposed is not None or self.changeset.applied is not None:
raise ValidationError('can not add change object to uneditable changeset.')
super().save(*args, **kwargs)