This commit is contained in:
Mo Bitar
2017-01-21 18:53:50 -06:00
parent 8e6a00b8d9
commit b9160e01fd
2 changed files with 1 additions and 3 deletions

View File

@@ -33,10 +33,8 @@ class ModelManager {
}
findOrCreateTagByTitle(title) {
console.log("looking for tag", title);
var tag = _.find(this.tags, {title: title})
if(!tag) {
console.log("not found, creating");
tag = this.createItem({content_type: "Tag", title: title});
this.addItem(tag);
}