Fix plugins order

This commit is contained in:
Iacopo Spalletti 2016-06-22 23:55:51 +02:00
parent a6feb4629d
commit 9bf5fa8895
No known key found for this signature in database
GPG Key ID: BDCBC2EB289F60C6
1 changed files with 3 additions and 1 deletions

View File

@ -37,7 +37,9 @@ class Liveblog(AbstractText):
saved = super(Liveblog, self).save(*args, **kwargs)
if self.publish:
self.send()
order = CMSPlugin.objects.filter(placeholder=self.placeholder).order_by('placeholder', '-path').values_list('pk', flat=True)
order = CMSPlugin.objects.filter(
placeholder=self.placeholder
).order_by('placeholder', 'path').values_list('pk', flat=True)
reorder_plugins(self.placeholder, None, self.language, order)
return saved