mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 20:59:59 +00:00
Don't generate empty torrent file for torrents without info dict (has_torrent).
This commit is contained in:
parent
607d9b2c92
commit
b241dd5508
|
@ -679,7 +679,7 @@ def redirect_magnet(torrent_id):
|
|||
def download_torrent(torrent_id):
|
||||
torrent = models.Torrent.by_id(torrent_id)
|
||||
|
||||
if not torrent:
|
||||
if not torrent or not torrent.has_torrent:
|
||||
flask.abort(404)
|
||||
|
||||
resp = flask.Response(_get_cached_torrent_file(torrent))
|
||||
|
|
Loading…
Reference in a new issue