Skip to content
Snippets Groups Projects
Commit e40ac9bd authored by Petrut-Daniel Coman's avatar Petrut-Daniel Coman :speech_balloon:
Browse files

Merge branch 'fluxio/dev-153-hotfix-build-error-in-create-profile' into 'fluxio/dev'

Resolve "hotfix build error in create profile"

See merge request !494
parents 285e0d5c 551ce326
No related branches found
No related tags found
2 merge requests!494Resolve "hotfix build error in create profile",!449Fluxio preliminary release
Pipeline #21552 failed
......@@ -13,7 +13,6 @@
#include <utility>
#include <vector>
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/locale.hpp>
#include <boost/uuid/name_generator.hpp>
#include <boost/uuid/nil_generator.hpp>
......@@ -1345,17 +1344,19 @@ namespace armarx::plugins
}
const auto& parentId = profile.parentPtr->id;
const auto& nameLowerCase = boost::algorithm::to_lower_copy(profile.name);
const auto& nameLowerCase = simox::alg:to_lower(profile.name);
std::unique_lock l(fluxioDC.profilesMutex);
if (std::find_if(fluxioDC.profiles.begin(),
fluxioDC.profiles.end(),
[&profile, &parentId, &nameLowerCase](auto& p)
{
return nameLowerCase == "root" ||
(p.parentPtr != nullptr && profile.parentPtr->id == parentId &&
boost::algorithm::to_lower(p.second.name) == nameLowerCase);
}) != fluxioDC.profiles.end())
auto it = std::find_if(
fluxioDC.profiles.begin(),
fluxioDC.profiles.end(),
[&parentId, &nameLowerCase](const std::pair<std::string, skills::FluxioProfile&>& p)
{
return p.second.parentPtr != nullptr && p.second.parentPtr->id == parentId &&
simox::alg::to_lower(p.second.name) == nameLowerCase;
});
if (nameLowerCase == "root" || it != fluxioDC.profiles.end())
{
ARMARX_WARNING << "Profile with name '" << profile.name << "' already exists.";
l.unlock();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment