If bin has no created date, set it to now.

This commit is contained in:
Tom Ashworth 2013-01-07 15:02:28 +00:00
parent 1e0e62f377
commit 85d641966e

View File

@ -339,7 +339,7 @@ module.exports = utils.inherit(Object, {
bin.active = bin.active === 'y';
if (!bin.created || isNaN(bin.created.getTime())) bin.created = new Date('2012-07-23 00:00:00');
if (!bin.created || isNaN(bin.created.getTime())) bin.created = new Date();
try {
bin.settings = JSON.parse(bin.settings || '{}');