Adding proper serial number cache for quick search

This commit is contained in:
stephb9959
2022-04-05 08:38:16 -07:00
parent 65467b7320
commit 6dbf33d764

View File

@@ -181,14 +181,16 @@ namespace OpenWifi {
ProvObjects::InventoryTag T;
if(InventoryDB().GetRecord("id", device, T)) {
NewDevices.emplace_back(device);
} else {
}
}
if(NewDevices!=V.devices) {
std::cout << "Fixing venue: " << V.info.name << std::endl;
// ProvObjects::Venue NewVenue = V;
// NewVenue.devices = NewDevices;
// VenueDB().UpdateRecord("id", V.info.id, NewVenue);
ProvObjects::Venue NewVenue = V;
NewVenue.devices = NewDevices;
VenueDB().UpdateRecord("id", V.info.id, NewVenue);
}
return true;