Skip to content

Commit

Permalink
fix menuitem change form rquired issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
FreemanPancake committed Nov 5, 2024
1 parent 709b316 commit ac0addc
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions djangocms_navigation/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ def is_locked(self, obj):
if version.state == DRAFT and version_is_locked(version):
if CMS_41:
return mark_safe('<span class="cms-icon cms-icon-lock"></span>')
else:
return render_to_string("djangocms_version_locking/admin/locked_icon.html")
return render_to_string("djangocms_version_locking/admin/locked_icon.html")
return ""

def _get_references_link(self, obj, request):
Expand Down Expand Up @@ -420,7 +419,6 @@ def _get_edit_link(self, obj, request, disabled=False):
title=_("Edit"),
name="edit",
disabled=disabled,
action="post",
keepsideframe=False,
)

Expand All @@ -445,11 +443,11 @@ def _get_delete_link(self, obj, request, disabled=False):
name="discard",
disabled=disabled,
)
else:
return render_to_string(
"djangocms_versioning/admin/discard_icon.html",
{"discard_url": delete_url, "disabled": disabled, "object_id": obj.id},
)

Check warning on line 446 in djangocms_navigation/admin.py

View workflow job for this annotation

GitHub Actions / flake8

blank line contains whitespace

Check warning on line 446 in djangocms_navigation/admin.py

View workflow job for this annotation

GitHub Actions / flake8

blank line contains whitespace
return render_to_string(
"djangocms_versioning/admin/icons/discard_icon.html",
{"discard_url": delete_url, "disabled": disabled, "object_id": obj.id},
)

def get_queryset(self, request):
if hasattr(request, "menu_content_id"):
Expand Down

0 comments on commit ac0addc

Please sign in to comment.