Skip to content

Commit

Permalink
Merge pull request #3223 from canonical/fix-overview-regression
Browse files Browse the repository at this point in the history
Revert "[daemon] Extract repeated argument derivation" 

r=sharder996 a=ricab
  • Loading branch information
ricab committed Oct 30, 2023
2 parents b82c750 + 1dd04f2 commit 3e344b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/daemon/daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1746,7 +1746,6 @@ try // clang-format on

const auto& it = instance_snapshots_map.find(name);
const auto& [pick, all_or_none] = it == instance_snapshots_map.end() ? SnapshotPick{{}, true} : it->second;
auto overview = response.mutable_snapshot_overview()->add_overview();

try
{
Expand All @@ -1756,12 +1755,13 @@ try // clang-format on
vm.get_snapshot(snapshot); // verify validity of any snapshot name requested separately

for (const auto& snapshot : vm.view_snapshots())
populate_snapshot_overview(name, snapshot, overview);
populate_snapshot_overview(name, snapshot, response.mutable_snapshot_overview()->add_overview());
}
else
{
for (const auto& snapshot : pick)
populate_snapshot_overview(name, vm.get_snapshot(snapshot), overview);
populate_snapshot_overview(name, vm.get_snapshot(snapshot),
response.mutable_snapshot_overview()->add_overview());
}
}
catch (const NoSuchSnapshot& e)
Expand Down

0 comments on commit 3e344b7

Please sign in to comment.