store: Filter out blank blueprint name

Filter out listing blueprints with no name. This prevents old state.json
data from continuing to cause problems with the UI.

Resolves: rhbz#1922845
This commit is contained in:
Brian C. Lane 2022-01-20 15:37:39 -08:00 committed by Ondřej Budai
parent a186fd4705
commit 9f29f8eb25

View file

@ -131,6 +131,9 @@ func (s *Store) ListBlueprints() []string {
names := make([]string, 0, len(s.blueprints))
for name := range s.blueprints {
if len(name) == 0 {
continue
}
names = append(names, name)
}
sort.Strings(names)