Browse Source

Send none if a course variable is missing

chapel 12 years ago
parent
commit
4d47bf7e71
1 changed files with 4 additions and 4 deletions
  1. 4 4
      models.js

+ 4 - 4
models.js

@@ -186,10 +186,10 @@ CourseSchema.virtual( 'sanitized' ).get(function() {
   var course = {
     _id: this._id,
     name: this.name,
-    number: this.number,
-    description: this.description,
-    subject: this.subject,
-    department: this.department
+    number: this.number || 'None',
+    description: this.description || 'None',
+    subject: this.subject || 'None',
+    department: this.department || 'None'
   }
 
   return course;