avoid exception in LoggerSerializers

This commit is contained in:
Brian Gough 2016-10-25 15:50:05 +01:00
parent bb06b97b3c
commit baf09e4f3a

View file

@ -1,5 +1,7 @@
module.exports =
user: (user) ->
if !user?
return null
if !user._id?
user = {_id : user}
return {
@ -10,6 +12,8 @@ module.exports =
}
project: (project) ->
if !project?
return null
if !project._id?
project = {_id: project}
return {