fix
This commit is contained in:
@@ -423,10 +423,13 @@ auto rdb_meta_db::set_item_meta(const std::string &api_path,
|
|||||||
|
|
||||||
auto rdb_meta_db::set_item_meta(const std::string &api_path,
|
auto rdb_meta_db::set_item_meta(const std::string &api_path,
|
||||||
const api_meta_map &meta) -> api_error {
|
const api_meta_map &meta) -> api_error {
|
||||||
|
REPERTORY_USES_FUNCTION_NAME();
|
||||||
|
|
||||||
json json_data;
|
json json_data;
|
||||||
auto res = get_item_meta_json(api_path, json_data);
|
auto res = get_item_meta_json(api_path, json_data);
|
||||||
if (res != api_error::success && res != api_error::item_not_found) {
|
if (res != api_error::success && res != api_error::item_not_found) {
|
||||||
return res;
|
utils::error::raise_api_path_error(function_name, api_path, res,
|
||||||
|
"failed to get item meta");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &data : meta) {
|
for (const auto &data : meta) {
|
||||||
|
|||||||
@@ -347,9 +347,11 @@ auto sqlite_meta_db::set_item_meta(const std::string &api_path,
|
|||||||
|
|
||||||
auto sqlite_meta_db::set_item_meta(const std::string &api_path,
|
auto sqlite_meta_db::set_item_meta(const std::string &api_path,
|
||||||
const api_meta_map &meta) -> api_error {
|
const api_meta_map &meta) -> api_error {
|
||||||
|
REPERTORY_USES_FUNCTION_NAME();
|
||||||
|
|
||||||
api_meta_map existing_meta{};
|
api_meta_map existing_meta{};
|
||||||
auto res = get_item_meta(api_path, existing_meta);
|
auto res = get_item_meta(api_path, existing_meta);
|
||||||
if (res != api_error::success) {
|
if (res != api_error::success && res != api_error::item_not_found) {
|
||||||
utils::error::raise_api_path_error(function_name, api_path, res,
|
utils::error::raise_api_path_error(function_name, api_path, res,
|
||||||
"failed to get item meta");
|
"failed to get item meta");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user