Skip to content
Snippets Groups Projects
Commit 901ab6e2 authored by Dylann Cordel's avatar Dylann Cordel :crossed_swords:
Browse files

fix duplicate column

parent 9a1289e0
No related branches found
No related tags found
No related merge requests found
...@@ -394,11 +394,12 @@ class NewsboxExpiredAdmin(NewsboxBaseAdmin): ...@@ -394,11 +394,12 @@ class NewsboxExpiredAdmin(NewsboxBaseAdmin):
def get_list_display(self, request): def get_list_display(self, request):
list_display = copy.copy(super(NewsboxExpiredAdmin, self).get_list_display(request)) list_display = copy.copy(super(NewsboxExpiredAdmin, self).get_list_display(request))
try: if 'newsbox_publication_dates_short' not in list_display:
index = list_display.index('newsbox_date_short') try:
list_display[index] = 'newsbox_publication_dates_short' index = list_display.index('newsbox_date_short')
except ValueError: list_display[index] = 'newsbox_publication_dates_short'
list_display.append('newsbox_publication_dates_short') except ValueError:
list_display.append('newsbox_publication_dates_short')
return list_display return list_display
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment