Improve exporter API error messages

This commit is contained in:
JonnyWong16 2020-09-27 15:30:10 -07:00
parent 0a60d5f2b2
commit 02d4a3b9fe
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 22 additions and 23 deletions

View file

@ -6524,10 +6524,10 @@ class WebInterface(object):
include_images=helpers.bool_true(include_images),
custom_fields=custom_fields).export()
if result:
if result is True:
return {'result': 'success', 'message': 'Metadata export has started.'}
else:
return {'result': 'error', 'message': 'Failed to export metadata.'}
return {'result': 'error', 'message': result}
@cherrypy.expose
@requireAuth(member_of("admin"))