| 33 | } |
| 34 | |
| 35 | void SettingsProfileElement::init(const ASTSettingsProfileElement & ast, const AccessControl * access_control) |
| 36 | { |
| 37 | auto name_to_id = [id_mode{ast.id_mode}, access_control](const String & name_) -> UUID |
| 38 | { |
| 39 | if (id_mode) |
| 40 | return parse<UUID>(name_); |
| 41 | chassert(access_control); |
| 42 | return access_control->getID<SettingsProfile>(name_); /// NOLINT(clang-analyzer-core.CallAndMessage) |
| 43 | }; |
| 44 | |
| 45 | if (!ast.parent_profile.empty()) |
| 46 | parent_profile = name_to_id(ast.parent_profile); |