Return 404 when channel could not be added and still does not exist.
This commit is contained in:
parent
7a7b1455ef
commit
ee89582a1b
1 changed files with 4 additions and 1 deletions
|
@ -26,7 +26,10 @@ def get_channel(channel_id=None, download_filter=None):
|
|||
common.ycdldb.add_channel(channel_id)
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
try:
|
||||
channel = common.ycdldb.get_channel(channel_id)
|
||||
except ycdl.exceptions.NoSuchChannel:
|
||||
flask.abort(404)
|
||||
else:
|
||||
channel = None
|
||||
|
||||
|
|
Loading…
Reference in a new issue