10000 next try · django-cms/django-cms@f410d2f · GitHub
[go: up one dir, main page]

Skip to content

Commit f410d2f

Browse files
author
Github Release Action
committed
next try
1 parent 730ab51 commit f410d2f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cms/models/placeholdermodel.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -785,11 +785,10 @@ def _recalculate_plugin_positions(self, language):
785785
elif db_vendor == 'postgresql':
786786
sql = (
787787
'WITH RowNbrs AS ('
788-
' SELECT ID, ROW_NUMBER() OVER (ORDER BY position, id) AS RowNbr'
789-
' FROM {0}'
790-
' WHERE placeholder_id=%s AND language=%s '
788+
' SELECT ID, ROW_NUMBER() OVER (ORDER BY position) AS RowNbr'
789+
' FROM {0} WHERE placeholder_id=%s AND language=%s '
791790
')UPDATE {0} SET position = RowNbrs.RowNbr '
792-
'FROM RowNbrs WHERE table.id = RowNbrs.id'
791+
'FROM RowNbrs WHERE {i}.id = RowNbrs.id'
793792
)
794793
(
795794
'UPDATE {0} '

0 commit comments

Comments
 (0)
0