Skip to content

Commit

Permalink
fixed issue: profiles broke with mianite xml change
Browse files Browse the repository at this point in the history
new 'runs' and 'downloads' items in mianite json broke parsing
(expectation of 'version' attribute).

This catches the error and lets it continue on gracefully.
  • Loading branch information
hexparrot committed Aug 19, 2016
1 parent ab13105 commit 37e4a9d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,12 @@ function check_profiles(base_dir, callback) {
for (var r in objects) {
var item = new profile_template();
var ref_obj = objects[r];
var version = ref_obj.version.match(/[\d+]\.[\d+]\.[\d+]/)[0];
try {
var version = ref_obj.version.match(/[\d+]\.[\d+]\.[\d+]/)[0];
} catch (e) {
continue;
}


item['id'] = ref_obj['version'];
item['group'] = 'mianite';
Expand Down

0 comments on commit 37e4a9d

Please sign in to comment.