diff --git a/app/nation/app/views/PublicationCoursesTable.js b/app/nation/app/views/PublicationCoursesTable.js index 18105f8f1..d44b6665d 100644 --- a/app/nation/app/views/PublicationCoursesTable.js +++ b/app/nation/app/views/PublicationCoursesTable.js @@ -10,12 +10,14 @@ $(function() { }, addOne: function(model) { - var publicationCourseRowView = new App.Views.PublicationCourseRow({ - model: model - }) - publicationCourseRowView.Id = this.Id - publicationCourseRowView.render() - this.$el.append(publicationCourseRowView.el) + if (model.attributes._id !== undefined) { + var publicationCourseRowView = new App.Views.PublicationCourseRow({ + model: model + }) + publicationCourseRowView.Id = this.Id + publicationCourseRowView.render() + this.$el.append(publicationCourseRowView.el) + } }, addAll: function() { diff --git a/app/nation/app/views/PublicationResourceTable.js b/app/nation/app/views/PublicationResourceTable.js index b458f8203..4cd6c4c5e 100644 --- a/app/nation/app/views/PublicationResourceTable.js +++ b/app/nation/app/views/PublicationResourceTable.js @@ -12,12 +12,14 @@ $(function() { //this.$el.append(_.template(this.template)) }, addOne: function(model) { - var publicationResourceRowView = new App.Views.PublicationResourceRow({ - model: model - }) - publicationResourceRowView.Id = this.Id - publicationResourceRowView.render() - this.$el.append(publicationResourceRowView.el) + if (model.attributes._id !== undefined) { + var publicationResourceRowView = new App.Views.PublicationResourceRow({ + model: model + }) + publicationResourceRowView.Id = this.Id + publicationResourceRowView.render() + this.$el.append(publicationResourceRowView.el) + } }, addAll: function() {