Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
4b203bdb
Commit
4b203bdb
authored
7 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Correctly increment orders
parent
3b0470db
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/storage/group_server.py
+2
-2
2 additions, 2 deletions
synapse/storage/group_server.py
with
2 additions
and
2 deletions
synapse/storage/group_server.py
+
2
−
2
View file @
4b203bdb
...
@@ -184,7 +184,7 @@ class GroupServerStore(SQLBaseStore):
...
@@ -184,7 +184,7 @@ class GroupServerStore(SQLBaseStore):
txn
.
execute
(
"""
txn
.
execute
(
"""
INSERT INTO group_summary_room_categories
INSERT INTO group_summary_room_categories
(group_id, category_id, cat_order)
(group_id, category_id, cat_order)
SELECT ?, ?, COALESCE(MAX(cat_order), 1
)
SELECT ?, ?, COALESCE(MAX(cat_order),
0) +
1
FROM group_summary_room_categories
FROM group_summary_room_categories
WHERE group_id = ? AND category_id = ?
WHERE group_id = ? AND category_id = ?
"""
,
(
group_id
,
category_id
,
group_id
,
category_id
))
"""
,
(
group_id
,
category_id
,
group_id
,
category_id
))
...
@@ -457,7 +457,7 @@ class GroupServerStore(SQLBaseStore):
...
@@ -457,7 +457,7 @@ class GroupServerStore(SQLBaseStore):
txn
.
execute
(
"""
txn
.
execute
(
"""
INSERT INTO group_summary_roles
INSERT INTO group_summary_roles
(group_id, role_id, role_order)
(group_id, role_id, role_order)
SELECT ?, ?, COALESCE(MAX(role_order), 1
)
SELECT ?, ?, COALESCE(MAX(role_order),
0) +
1
FROM group_summary_roles
FROM group_summary_roles
WHERE group_id = ? AND role_id = ?
WHERE group_id = ? AND role_id = ?
"""
,
(
group_id
,
role_id
,
group_id
,
role_id
))
"""
,
(
group_id
,
role_id
,
group_id
,
role_id
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment