can_propose only if there are changed objects
This commit is contained in:
parent
7973a9e632
commit
1ba2df6116
3 changed files with 3 additions and 2 deletions
|
@ -292,7 +292,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
|
||||
return self.can_edit(request) and not self.proposed and self.changed_objects_count
|
||||
|
||||
def can_unpropose(self, request):
|
||||
return self.author_id == request.user.pk and self.state in ('proposed', 'reproposed')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue