Adding locations for venue.

This commit is contained in:
stephb9959
2022-03-09 07:32:15 -08:00
parent 5416db9037
commit 1118fa8b0e

View File

@@ -239,12 +239,13 @@ namespace OpenWifi {
inline void GetLocationsForVenue(const std::string &ID, std::vector<triplet_t> & IDs) {
ProvObjects::Venue Existing;
if(StorageService()->VenueDB().template GetRecord("id",ID,Existing)) {
if(!Existing.location.empty()) {
AddLocationTriplet(Existing.location,IDs);
}
if(!Existing.parent.empty()) {
GetLocationsForVenue(Existing.parent,IDs);
}
ProvObjects::Entity E;
if(StorageService()->EntityDB().GetRecord("id", Existing.entity, E)) {
AddLocationTriplet(E.locations,IDs);
}
return;
}
}