Use integer for contributor ID everywhere

closes #145
This commit is contained in:
2022-05-21 18:16:26 +02:00
parent 466354cff7
commit 4c749bca35
14 changed files with 47 additions and 43 deletions
+11 -1
View File
@@ -9,7 +9,15 @@ export default Component.extend({
kredits: service(),
attributes: null,
contributors: alias('kredits.contributorsSorted'),
contributors: computed('kredits.contributorsSorted.[]', function() {
return this.kredits.contributorsSorted.map(c => {
return {
id: c.id.toString(),
name: c.name
}
})
}),
isValidContributor: notEmpty('contributorId'),
isValidKind: notEmpty('kind'),
@@ -57,6 +65,8 @@ export default Component.extend({
const attributes = this.getProperties(Object.keys(this.attributes));
attributes.contributorId = parseInt(this.contributorId);
let dateInput = (attributes.date instanceof Array) ?
attributes.date[0] : attributes.date;