more stuff for not applying changesets when they have problems

This commit is contained in:
Laura Klünder 2024-12-02 13:40:53 +01:00
parent ad252bf6c6
commit a88f8cea34
3 changed files with 7 additions and 3 deletions

View file

@ -167,7 +167,7 @@ class ChangeSet(models.Model):
return self.can_edit(request) and self.state == 'unproposed'
def can_propose(self, request):
return self.can_edit(request) and not self.proposed and self.changes
return self.can_edit(request) and not self.proposed and self.changes and not self.problems.any
def can_unpropose(self, request):
return self.author_id == request.user.pk and self.state in ('proposed', 'reproposed')