unify audit fields, fixes #102

This commit is contained in:
azivner
2018-05-26 12:38:25 -04:00
parent 933cce1b94
commit 03bf33630e
9 changed files with 56 additions and 11 deletions

View File

@@ -127,7 +127,7 @@ async function updateOptions(entity, sourceId) {
async function updateRecentNotes(entity, sourceId) {
const orig = await sql.getRowOrNull("SELECT * FROM recent_notes WHERE branchId = ?", [entity.branchId]);
if (orig === null || orig.dateAccessed < entity.dateAccessed) {
if (orig === null || orig.dateCreated < entity.dateCreated) {
await sql.transactional(async () => {
await sql.replace('recent_notes', entity);