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
62fac9d9
Commit
62fac9d9
authored
5 years ago
by
Jason Robinson
Browse files
Options
Downloads
Patches
Plain Diff
Auto-fix a few code style issues
Signed-off-by:
Jason Robinson
<
jasonr@matrix.org
>
parent
be618e05
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/storage/registration.py
+4
-4
4 additions, 4 deletions
synapse/storage/registration.py
with
4 additions
and
4 deletions
synapse/storage/registration.py
+
4
−
4
View file @
62fac9d9
...
@@ -332,9 +332,7 @@ class RegistrationWorkerStore(SQLBaseStore):
...
@@ -332,9 +332,7 @@ class RegistrationWorkerStore(SQLBaseStore):
Returns:
Returns:
Deferred[bool]: True if user
'
user_type
'
is null or empty string
Deferred[bool]: True if user
'
user_type
'
is null or empty string
"""
"""
res
=
yield
self
.
runInteraction
(
res
=
yield
self
.
runInteraction
(
"
is_real_user
"
,
self
.
is_real_user_txn
,
user_id
)
"
is_real_user
"
,
self
.
is_real_user_txn
,
user_id
)
return
res
return
res
@cachedInlineCallbacks
()
@cachedInlineCallbacks
()
...
@@ -451,7 +449,9 @@ class RegistrationWorkerStore(SQLBaseStore):
...
@@ -451,7 +449,9 @@ class RegistrationWorkerStore(SQLBaseStore):
"""
Counts all users without a special user_type registered on the homeserver.
"""
"""
Counts all users without a special user_type registered on the homeserver.
"""
def
_count_users
(
txn
):
def
_count_users
(
txn
):
txn
.
execute
(
"
SELECT COUNT(*) AS users FROM users where user_type is null or user_type =
''"
)
txn
.
execute
(
"
SELECT COUNT(*) AS users FROM users where user_type is null or user_type =
''"
)
rows
=
self
.
cursor_to_dict
(
txn
)
rows
=
self
.
cursor_to_dict
(
txn
)
if
rows
:
if
rows
:
return
rows
[
0
][
"
users
"
]
return
rows
[
0
][
"
users
"
]
...
...
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