Skip to content

Commit

Permalink
#2229: Return nullptr for metadata's attribute field when we don't ha…
Browse files Browse the repository at this point in the history
…ve any
  • Loading branch information
JacobDomagala committed Feb 22, 2024
1 parent 01039e3 commit 81d91e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vt/vrt/collection/balance/lb_data_holder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ std::unique_ptr<nlohmann::json> LBDataHolder::metadataToJson() const {
}

std::unique_ptr<nlohmann::json> LBDataHolder::rankAttributesToJson() const {
if (rank_attributes_.empty()) {
return nullptr;
}

nlohmann::json j;

for (auto const& [key, value] : rank_attributes_) {
Expand Down

0 comments on commit 81d91e0

Please sign in to comment.