Add missing return failure

This commit is contained in:
Joshua Boniface 2020-01-05 20:16:49 -05:00
parent 80077efc63
commit 5521110043
1 changed files with 4 additions and 1 deletions

View File

@ -697,7 +697,10 @@ def list_profile(limit, is_fuzzy=True):
# Append the new data to our actual output structure # Append the new data to our actual output structure
data.append(profile_data) data.append(profile_data)
close_database(conn, cur) close_database(conn, cur)
return data if data:
return data, 200
else:
return {'message': 'No scripts found'}, 404
def create_profile(name, system_template, network_template, storage_template, userdata, script, arguments=None): def create_profile(name, system_template, network_template, storage_template, userdata, script, arguments=None):
if list_profile(name, is_fuzzy=False)[-1] != 404: if list_profile(name, is_fuzzy=False)[-1] != 404: