def _jsonify_many(self): query = Location.query.filter_by(is_deleted=False) return jsonify(admin_locations_schema.dump(query.all()))
def _jsonify_one(self, location): return jsonify(admin_locations_schema.dump(location, many=False))
def _process(self): query = Location.query.options(joinedload('rooms')) return jsonify(admin_locations_schema.dump(query.all()).data)
def _jsonify_many(self): query = Location.query.filter_by(is_deleted=False).options(joinedload('rooms')) return jsonify(admin_locations_schema.dump(query.all()))