Skip to content

Commit

Permalink
Removed setting the dicionaryID on the record that wasn't needed. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Devon Anderson authored Dec 4, 2023
1 parent 6041d92 commit 985705c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions app/services/mdjson.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,9 @@ export default Service.extend({

let dicts = this.store.peekAll('dictionary').filterBy(
'dictionaryId');

ids.forEach((id) => {
let record = dicts.findBy('dictionaryId', id);

// dictionaryId is important, but it's not in "dataDictionary" - I feel like it
// should be included so the id can be stable when importing/exporting
//
// fixes https://github.com/adiwg/mdTranslator/issues/238
record.set('json.dataDictionary.dictionaryId', id);

if(record) {
arr.pushObject(record.get('json.dataDictionary'));
}
Expand Down Expand Up @@ -248,6 +241,7 @@ export default Service.extend({
validateDictionary(dictionary) {
validator.validate('dataDictionary', dictionary.get('cleanJson').dataDictionary);

console.log(validator)
return validator;
}
});

0 comments on commit 985705c

Please sign in to comment.