Commit eeb50030 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou Committed by Christos Stavrakakis
Browse files

ui: Properly set snapshot OS attribute

if not already set
parent c6da3683
......@@ -124,8 +124,12 @@
img = models.GlanceImages.__super__.parse_meta.call(this, img);
if (img.checksum && img.checksum.indexOf('arch') == 0) {
img.OS = 'snapshot';
img.metadata.OS = 'snapshot';
if (!img.OS) {
img.OS = 'snapshot';
}
if (!img.metadata || !img.metadata.OS) {
img.metadata.OS = 'snapshot';
}
}
return img;
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment