--- a/client/js/models.js Tue Nov 13 11:46:39 2012 +0100
+++ b/client/js/models.js Tue Nov 06 13:23:19 2012 +0100
@@ -88,7 +88,7 @@
description: this.get("description"),
position: this.get("position"),
image: this.get("image"),
- created_by: this.get("created_by").get("_id")
+ created_by: this.get("created_by") ? this.get("created_by").get("_id") : null
};
},
});
@@ -126,9 +126,9 @@
title: this.get("title"),
uri: this.get("uri"),
description: this.get("description"),
- from: this.get("from").get("_id"),
- to: this.get("to").get("_id"),
- created_by: this.get("created_by").get("_id"),
+ from: this.get("from") ? this.get("from").get("_id") : null,
+ to: this.get("to") ? this.get("to").get("_id") : null,
+ created_by: this.get("created_by") ? this.get("created_by").get("_id") : null
};
},
});