Commit 30f4695e authored by Michal Čihař's avatar Michal Čihař

Remove method used in single place

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent d02838d9
......@@ -1239,12 +1239,3 @@ class Translation(models.Model, URLMixin, PercentMixin, LoggerMixin):
Returns URL of exported git repository.
'''
return self.subproject.get_export_url()
def only_vote_suggestions(self):
"""
Whether we can vote for suggestions.
"""
return (
self.subproject.suggestion_voting and
self.subproject.suggestion_autoaccept > 0
)
......@@ -34,8 +34,9 @@ def can_edit(user, translation, permission):
return False
if translation.is_template() and not user.has_perm('trans.save_template'):
return False
if (translation.only_vote_suggestions() and not
user.has_perm('trans.override_suggestion')):
if (translation.subproject.suggestion_voting and
translation.subproject.suggestion_autoaccept > 0 and
not user.has_perm('trans.override_suggestion')):
return False
return True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment