projects
/
oweals
/
finalsclub.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b23101
)
Send none if a course variable is missing
author
chapel
<jacob.chapel@gmail.com>
Sun, 20 Nov 2011 02:56:09 +0000
(18:56 -0800)
committer
chapel
<jacob.chapel@gmail.com>
Sun, 20 Nov 2011 02:56:09 +0000
(18:56 -0800)
models.js
patch
|
blob
|
history
diff --git
a/models.js
b/models.js
index 87d427e960bc5703b81cc310df5c175bf15c52ef..15b812521b5b662a9a3dce6143b83408d7483629 100644
(file)
--- a/
models.js
+++ b/
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;