From ab81b247c68ee9cb8e65cfbd51c410c458458d79 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sun, 23 Jul 2017 18:11:33 -0600 Subject: [PATCH] Fix file newscan pointer --- core/file_base_filter.js | 2 +- core/file_entry.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/file_base_filter.js b/core/file_base_filter.js index 787a40ba..99f6e323 100644 --- a/core/file_base_filter.js +++ b/core/file_base_filter.js @@ -132,7 +132,7 @@ module.exports = class FileBaseFilters { } static getFileBaseLastViewedFileIdByUser(user) { - return user.properties.user_file_base_last_viewed || 0; + return parseInt((user.properties.user_file_base_last_viewed || 0)); } static setFileBaseLastViewedFileIdForUser(user, fileId, cb) { diff --git a/core/file_entry.js b/core/file_entry.js index 8cf917c9..b88d41a0 100644 --- a/core/file_entry.js +++ b/core/file_entry.js @@ -515,7 +515,7 @@ module.exports = class FileEntry { } if(_.isNumber(filter.newerThanFileId)) { - appendWhereClause(`file_id > ${filter.newerThanFileId}`); + appendWhereClause(`f.file_id > ${filter.newerThanFileId}`); } sql += `${sqlWhere} ${sqlOrderBy};`;