Skip to content

Commit

Permalink
Corrige une faute d'anglais (#4342)
Browse files Browse the repository at this point in the history
  • Loading branch information
GCodeur authored and gustavi committed Jun 3, 2017
1 parent a2c818e commit 12f6c13
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion zds/tutorialv2/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def get_context_data(self, **kwargs):
context['can_edit'] = self.is_author
context['is_staff'] = self.is_staff
if self.object.type == 'OPINION':
context['can_publish'] = not self.object.is_definitely_unpublished()
context['can_publish'] = not self.object.is_permanently_unpublished()
if self.sha != self.object.sha_draft:
context['version'] = self.sha

Expand Down
4 changes: 2 additions & 2 deletions zds/tutorialv2/models/models_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ def is_public(self, sha):
"""
return self.in_public() and sha == self.sha_public

def is_definitely_unpublished(self):
"""Is this content definitely unpublished by a moderator ?"""
def is_permanently_unpublished(self):
"""Is this content permanently unpublished by a moderator ?"""

return PickListOperation.objects.filter(content=self, operation='REMOVE_PUB', is_effective=True).exists()

Expand Down
2 changes: 1 addition & 1 deletion zds/tutorialv2/tests/tests_opinion_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def test_ignore_opinion(self):
result = self.client.get(reverse('validation:list-opinion'))
self.assertNotContains(result, opinion.title)

def test_definitely_unpublish_opinion(self):
def test_permanently_unpublish_opinion(self):
opinion = PublishableContentFactory(type='OPINION')

opinion.authors.add(self.user_author)
Expand Down
2 changes: 1 addition & 1 deletion zds/tutorialv2/views/views_validations.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def get_form_kwargs(self):
def form_valid(self, form):
# get database representation
db_object = self.object
if self.object.is_definitely_unpublished():
if self.object.is_permanently_unpublished():
raise PermissionDenied
versioned = self.versioned_object
self.success_url = versioned.get_absolute_url()
Expand Down

0 comments on commit 12f6c13

Please sign in to comment.