Skip to content

Commit

Permalink
add hack to remove duplicate viewlets (probably the code above is bro…
Browse files Browse the repository at this point in the history
…ken)
  • Loading branch information
pbauer committed Apr 1, 2018
1 parent 0cd92c1 commit a6c34b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plone/app/viewletmanager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def sort(self, viewlets):
# Fall back to viewlet names
remaining = sorted(viewlets, key=itemgetter(0))

# return both together
return result + remaining
# return both together remove duplicates, keep order
return list(dict.fromkeys(result + remaining))

def render(self):
if self.template:
Expand Down

0 comments on commit a6c34b3

Please sign in to comment.