Merge pull request #185 from safing/fix/profiles

Fix incorrect layered profile key
This commit is contained in:
Daniel
2020-11-02 14:11:09 +01:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -47,6 +47,7 @@ func getRevisions(key string) ([]record.Record, error) {
if profile == nil {
return nil, errProfileNotActive
}
profiles = append(profiles, profile)
}
records := make([]record.Record, 0, len(profiles))

View File

@@ -125,7 +125,7 @@ func NewLayeredProfile(localProfile *Profile) *LayeredProfile {
new.updateCaches()
new.CreateMeta()
new.SetKey(runtime.DefaultRegistry.DatabaseName() + ":" + revisionProviderPrefix + localProfile.ID)
new.SetKey(runtime.DefaultRegistry.DatabaseName() + ":" + revisionProviderPrefix + localProfile.ScopedID())
// Inform database subscribers about the new layered profile.
new.Lock()