Another lettuce test, and fixes to make it work

This commit is contained in:
David Baumgold
2013-07-02 10:57:10 -04:00
parent ca2339f15e
commit 7506562f50
4 changed files with 78 additions and 10 deletions

View File

@@ -85,7 +85,7 @@ CMS.Models.Textbook = Backbone.AssociatedModel.extend({
invalidChapters.push(chapter);
}
});
if(invalidChapters) {
if(!_.isEmpty(invalidChapters)) {
return {
message: "All chapters must have a name and asset",
attributes: {chapters: invalidChapters}