diff --git a/openlp/plugins/bibles/remote.py b/openlp/plugins/bibles/remote.py index 9426c0cf7..41d1c8d19 100644 --- a/openlp/plugins/bibles/remote.py +++ b/openlp/plugins/bibles/remote.py @@ -61,9 +61,7 @@ def add(id): def search_bible(): text = request.args.get('text', '') result = search(text) - if result: - return jsonify(result) - return '', 400 + return jsonify(result) @v2_views.route('/live', methods=['POST']) diff --git a/openlp/plugins/custom/remote.py b/openlp/plugins/custom/remote.py index 23904db17..d49d4dca3 100644 --- a/openlp/plugins/custom/remote.py +++ b/openlp/plugins/custom/remote.py @@ -61,9 +61,7 @@ def add(id): def search_view(): text = request.args.get('text', '') result = search(text) - if result: - return jsonify(result) - return '', 400 + return jsonify(result) @v2_custom.route('/add', methods=['POST']) diff --git a/openlp/plugins/images/remote.py b/openlp/plugins/images/remote.py index ba3e10e42..46065effc 100644 --- a/openlp/plugins/images/remote.py +++ b/openlp/plugins/images/remote.py @@ -61,9 +61,7 @@ def add(id): def search_view(): text = request.args.get('text', '') result = search(text) - if result: - return jsonify(result) - return '', 400 + return jsonify(result) @v2_images.route('/add', methods=['POST']) diff --git a/openlp/plugins/media/remote.py b/openlp/plugins/media/remote.py index f419ef3d0..83f45e722 100644 --- a/openlp/plugins/media/remote.py +++ b/openlp/plugins/media/remote.py @@ -61,9 +61,7 @@ def add(id): def search_view(): text = request.args.get('text', '') result = search(text) - if result: - return jsonify(result) - return '', 400 + return jsonify(result) @v2_media.route('/add', methods=['POST']) diff --git a/openlp/plugins/presentations/remote.py b/openlp/plugins/presentations/remote.py index 0a97a10d4..1e67b0ad9 100644 --- a/openlp/plugins/presentations/remote.py +++ b/openlp/plugins/presentations/remote.py @@ -61,9 +61,7 @@ def add(id): def search_view(): text = request.args.get('text', '') result = search(text) - if result: - return jsonify(result) - return '', 400 + return jsonify(result) @v2_presentations.route('/add', methods=['POST']) diff --git a/openlp/plugins/songs/remote.py b/openlp/plugins/songs/remote.py index c7bd83e20..98ce1dd82 100644 --- a/openlp/plugins/songs/remote.py +++ b/openlp/plugins/songs/remote.py @@ -61,9 +61,7 @@ def add(id): def search_view(): text = request.args.get('text', '') result = search(text) - if result: - return jsonify(result) - return '', 400 + return jsonify(result) @v2_songs.route('/add', methods=['POST'])