mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-30 01:46:24 +01:00
Sort side panels by order
This commit is contained in:
parent
80643e0680
commit
c6e6f46c29
@ -142,12 +142,12 @@ class BaseSidePanels:
|
||||
]
|
||||
|
||||
def __iter__(self):
|
||||
return iter(self.side_panels)
|
||||
return iter(sorted(self.side_panels, key=lambda p: p.order))
|
||||
|
||||
@cached_property
|
||||
def media(self):
|
||||
media = Media()
|
||||
for panel in self.side_panels:
|
||||
for panel in self:
|
||||
media += panel.media
|
||||
return media
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user