Skip to content

Commit

Permalink
[ENH] remove redundant checks for Series conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Levitas committed Nov 14, 2023
1 parent ac8b85a commit f4f1ee0
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions ui/src/SeriesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -267,27 +267,29 @@ export default defineComponent({
validate_B0FieldIdentifier_B0FieldSource(s);
}
//let user know if multiple series have same datatype and entity labels
if(s.type != "exclude") {
for(let s2 of this.ezbids.series) {
if(s == s2) continue;
if(s.type != s2.type) continue;
if(s2.type == "exclude") continue;
let same = s2;
for(let e in s.entities) {
if(s.entities[e] != s2.entities[e]) {
same = undefined;
break;
}
}
if(same) {
const sameseries = s2.series_idx;
s.validationWarnings.push("This series contains the same datatype, suffix and entity labels as series #"+sameseries+", consider setting different entity label(s) to differentiate between the series. If not, ezBIDS will automatically apply the run entity label to differentiate.");
break;
}
}
}
// DON'T REALLY NEED THIS if setRun() functionality is in place
// //let user know if multiple series have same datatype and entity labels
// if(s.type != "exclude") {
// for(let s2 of this.ezbids.series) {
// if(s == s2) continue;
// if(s.type != s2.type) continue;
// if(s2.type == "exclude") continue;
// let same = s2;
// for(let e in s.entities) {
// if(s.entities[e] != s2.entities[e]) {
// same = undefined;
// break;
// }
// }
// if(same) {
// const sameseries = s2.series_idx;
// s.validationWarnings.push("This series contains the same datatype, suffix and entity labels as series #"+sameseries+", consider setting different entity label(s) to differentiate between the series. If not, ezBIDS will automatically apply the run entity label to differentiate.");
// break;
// }
// }
// }
let entities_requirement = this.getBIDSEntities(s.type);
for(let k in this.getSomeEntities(s.type)) {
Expand Down

0 comments on commit f4f1ee0

Please sign in to comment.