Order sadly matters with this check in peewee

This commit is contained in:
Joseph Schorr 2016-01-11 15:10:46 -05:00
parent b0d700decd
commit c36a7c21c8

View file

@ -255,7 +255,7 @@ def get_torrent_info(blob):
try: try:
return (TorrentInfo return (TorrentInfo
.select() .select()
.where(blob == TorrentInfo.storage) .where(TorrentInfo.storage == blob)
.get()) .get())
except TorrentInfo.DoesNotExist: except TorrentInfo.DoesNotExist:
raise TorrentInfoDoesNotExist raise TorrentInfoDoesNotExist