X-Git-Url: http://git.squeep.com/?p=websub-hub;a=blobdiff_plain;f=src%2Fdb%2Fsqlite%2Findex.js;h=76309d6c039f623749b575b2f1b1b20f9fb212e5;hp=56afa000cb886f900277e4bf819139b93e926707;hb=1d571ced238ac89098fa690bd35f5c9f58cb18f2;hpb=e5c67776b7a31daac84b5a047f9e566657e5b7f9 diff --git a/src/db/sqlite/index.js b/src/db/sqlite/index.js index 56afa00..76309d6 100644 --- a/src/db/sqlite/index.js +++ b/src/db/sqlite/index.js @@ -759,7 +759,7 @@ class DatabaseSQLite extends Database { } - topicGetByUrl(dbCtx, topicUrl) { + topicGetByUrl(dbCtx, topicUrl, applyDefaults = true) { const _scope = _fileScope('topicGetByUrl'); this.logger.debug(_scope, 'called', { topicUrl }); @@ -767,7 +767,10 @@ class DatabaseSQLite extends Database { try { topic = this.statement.topicGetByUrl.get({ topicUrl }); DatabaseSQLite._topicDataToNative(topic); - return this._topicDefaults(topic); + if (applyDefaults) { + topic = this._topicDefaults(topic); + } + return topic; } catch (e) { this.logger.error(_scope, 'failed', { error: e, topic, topicUrl }); throw e;