Skip to content

Commit 59cb717

Browse files
committed
Fix mistaken commit
1 parent d5e8ed5 commit 59cb717

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mautrix_telegram/db/portal.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ def count(cls) -> int:
6262
except StopIteration:
6363
return 0
6464

65+
@classmethod
66+
def get_by_mxid(cls, mxid: RoomID) -> Optional['Portal']:
67+
return cls._select_one_or_none(cls.c.mxid == mxid)
68+
6569
@classmethod
6670
def get_by_username(cls, username: str) -> Optional['Portal']:
6771
return cls._select_one_or_none(func.lower(cls.c.username) == username)
6872

6973
@classmethod
7074
def all(cls) -> Iterable['Portal']:
71-
yield from cls._select_all()
72-
73-
@classmethod
74-
def get_by_mxid(cls, mxid: RoomID) -> Integer:
75-
return cls._select_one_or_none(cls.c.mxid == mxid)
75+
yield from cls._select_all()

0 commit comments

Comments
 (0)