mailing lists: raise exception on create failure

This commit is contained in:
Drew DeVault 2020-04-29 11:56:20 -04:00
parent 806f497867
commit 8bafcc57c6
1 changed files with 3 additions and 0 deletions

View File

@ -1,3 +1,4 @@
import json
from flask import Blueprint, render_template, request, redirect, url_for
from hubsrht.projects import ProjectAccess, get_project
from hubsrht.services import lists
@ -94,6 +95,8 @@ Mailing list for end-user discussion and questions related to the
"name": list_name,
"description": descs[list_name],
}))
if not mailing_list:
raise Exception(json.dumps(valid.response))
ml = MailingList()
ml.remote_id = mailing_list["id"]