Skip to content

Commit

Permalink
Fix mistaken commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot committed Nov 26, 2020
1 parent d5e8ed5 commit 59cb717
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mautrix_telegram/db/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ def count(cls) -> int:
except StopIteration:
return 0

@classmethod
def get_by_mxid(cls, mxid: RoomID) -> Optional['Portal']:
return cls._select_one_or_none(cls.c.mxid == mxid)

@classmethod
def get_by_username(cls, username: str) -> Optional['Portal']:
return cls._select_one_or_none(func.lower(cls.c.username) == username)

@classmethod
def all(cls) -> Iterable['Portal']:
yield from cls._select_all()

@classmethod
def get_by_mxid(cls, mxid: RoomID) -> Integer:
return cls._select_one_or_none(cls.c.mxid == mxid)
yield from cls._select_all()

0 comments on commit 59cb717

Please sign in to comment.