def get_all_topics(): include_appointments = app.config['FEATURE_FLAG_ADVISOR_APPOINTMENTS'] include_deleted = to_bool_or_none(request.args.get('includeDeleted')) if include_appointments: topics = Topic.get_all(include_deleted=include_deleted) else: topics = Topic.get_all(available_in_notes=True, include_deleted=include_deleted) if not app.config['FEATURE_FLAG_ADVISOR_APPOINTMENTS']: for index, topic in enumerate(topics): if not topic.available_in_notes: topics.pop(index) return tolerant_jsonify(_to_api_json(topics))
def get_topics_for_notes(): include_deleted = to_bool_or_none(request.args.get('includeDeleted')) topics = Topic.get_all(available_in_notes=True, include_deleted=include_deleted) return tolerant_jsonify(_to_sorted_json(topics))
def get_all_topics(): include_deleted = to_bool_or_none(request.args.get('includeDeleted')) topics = Topic.get_all(include_deleted=include_deleted) return tolerant_jsonify(_to_sorted_json(topics))
def get_topics(): include_deleted = to_bool_or_none(request.args.get('includeDeleted')) topics = Topic.get_all(include_deleted=include_deleted) return tolerant_jsonify([topic.to_api_json() for topic in topics])