Comparing version 1.16.4 to 1.16.5
@@ -390,12 +390,18 @@ const toStamp = require('./util').toStamp | ||
this.db.batch([ | ||
{ type: 'put', key: pkey, value: value }, | ||
{ type: 'put', key: tkey, value: 0 } | ||
], function (err) { | ||
if (err) { | ||
return cb(err) | ||
this.db.get(pkey, (_err, old) => { | ||
if (old) { | ||
return cb(new Error(`There is already another entry with stamp ${toStamp(pkey)}. Please move, update, or delete it first.`)) | ||
} | ||
var stamp = toStamp(pkey) | ||
return cb(null, stamp) | ||
this.db.batch([ | ||
{ type: 'put', key: pkey, value: value }, | ||
{ type: 'put', key: tkey, value: 0 } | ||
], function (err) { | ||
if (err) { | ||
return cb(err) | ||
} | ||
var stamp = toStamp(pkey) | ||
return cb(null, stamp) | ||
}) | ||
}) | ||
@@ -402,0 +408,0 @@ } |
{ | ||
"name": "clocker", | ||
"version": "1.16.4", | ||
"version": "1.16.5", | ||
"description": "track project hours", | ||
@@ -5,0 +5,0 @@ "bin": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
120225
2114