Fix validation errors on new list

This commit is contained in:
Drew DeVault 2020-04-29 12:07:34 -04:00
parent 8bafcc57c6
commit b5ddb82dd0
1 changed files with 5 additions and 4 deletions

View File

@ -91,12 +91,13 @@ Mailing list for end-user discussion and questions related to the
try:
mailing_list = lists.get_list(owner, list_name)
except:
mailing_list = lists.create_list(owner, Validation({
valid = Validation({
"name": list_name,
"description": descs[list_name],
}))
if not mailing_list:
raise Exception(json.dumps(valid.response))
})
mailing_list = lists.create_list(owner, valid))
if not mailing_list:
raise Exception(json.dumps(valid.response))
ml = MailingList()
ml.remote_id = mailing_list["id"]