Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dklimpel committed Nov 1, 2020
1 parent 07e8a09 commit b83bede
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions synapse/rest/admin/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@
# limitations under the License.

import logging
from typing import Tuple
from typing import TYPE_CHECKING, Tuple

from synapse.api.errors import Codes, SynapseError
from synapse.http.servlet import RestServlet, parse_integer, parse_string
from synapse.http.site import SynapseRequest
from synapse.rest.admin._base import admin_patterns, assert_requester_is_admin
from synapse.server import HomeServer
from synapse.storage.databases.main.stats import UserSortOrder
from synapse.types import JsonDict

if TYPE_CHECKING:
from synapse.server import HomeServer

logger = logging.getLogger(__name__)


Expand All @@ -34,7 +36,7 @@ class UserMediaStatisticsRestServlet(RestServlet):

PATTERNS = admin_patterns("/statistics/users/media$")

def __init__(self, hs: HomeServer):
def __init__(self, hs: "HomeServer"):
self.hs = hs
self.auth = hs.get_auth()
self.store = hs.get_datastore()
Expand Down
1 change: 0 additions & 1 deletion synapse/storage/databases/main/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,6 @@ def get_users_media_usage_paginate_txn(txn):
else:
order = "ASC"

sql_order = "ORDER BY %s %s" % (order_by_column, order)
where_clause = "WHERE " + " AND ".join(filters) if len(filters) > 0 else ""

sql_base = """
Expand Down

0 comments on commit b83bede

Please sign in to comment.