def _ports(): result = Log.get_ports() if not result.success: flash(result.message, result.severity) result.message = [] if len(result.message) == 0: flash('There are no Portfolios. Create one before proceeding further', 'WARNING') return result.message
def home(): ports = Log.get_ports() if not ports.success: abort(500, ports.message) return jsonify([port.to_json() for port in ports.message])