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

@@ -30,7 +30,7 @@ angular.module('app.frontend')
for(var tag of tags) { for(var tag of tags) {
modelManager.createRelationshipBetweenItems(note, tag); modelManager.createRelationshipBetweenItems(note, tag);
} }
console.log("updating tags for note", note, tags);
apiController.sync(); apiController.sync();
} }

View File

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