Skip to content

Commit

Permalink
Removed hyperlink from first column on list_display when versioning i…
Browse files Browse the repository at this point in the history
…s enabled
  • Loading branch information
Bernardvdv committed Jan 6, 2022
1 parent 4564d69 commit 387d907
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions djangocms_snippet/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ def get_prepopulated_fields(self, obj, request):
prepopulated_fields = {'slug': ('name',)}
return prepopulated_fields

def get_list_display_links(self, request, list_display):
if not djangocms_versioning_enabled:
return list(list_display)[:1]
else:
self.list_display_links = (None,)
return self.list_display_links

def get_urls(self):
info = self.model._meta.app_label, self.model._meta.model_name
return [
Expand Down

0 comments on commit 387d907

Please sign in to comment.