Skip to content

Commit

Permalink
Update condition
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Dec 29, 2023
1 parent 6fd9d43 commit d7e44fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions djangocms_versioning/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,8 @@ def locked(self, version):
return ""

def _get_preview_link(self, obj, request):
if obj.state == DRAFT and not obj.locked_by:
# Draft versions have edit button
if obj.state == DRAFT and obj.check_edit_redirect.as_bool(request.user):
# Draft versions might have edit button
return ""
url = get_preview_url(obj.content)
return self.admin_action_button(
Expand Down

0 comments on commit d7e44fe

Please sign in to comment.