Merge branch 'hotfix/md5err' into 'release/6.4'
Hotfix/md5err See merge request !1192
Showing
2 changed files
with
8 additions
and
6 deletions
@@ -344,11 +344,13 @@ const listNew = (req, res, next) => { | @@ -344,11 +344,13 @@ const listNew = (req, res, next) => { | ||
344 | seoTitle = stringProcess.decodeURIComponent(paramsTitle); | 344 | seoTitle = stringProcess.decodeURIComponent(paramsTitle); |
345 | } | 345 | } |
346 | 346 | ||
347 | - try { | ||
348 | - categoryIntroRedis = | ||
349 | - yield redis.hmgetAsync(`category:description:${md5(seoTitle)}`, 'category', 'description').timeout(200); | ||
350 | - } catch (e) { | ||
351 | - logger.error('redis.hmgetAsync.category.description:' + e); | 347 | + if (seoTitle) { |
348 | + try { | ||
349 | + categoryIntroRedis = | ||
350 | + yield redis.hmgetAsync(`category:description:${md5(seoTitle)}`, 'category', 'description').timeout(200); // eslint-disable-line | ||
351 | + } catch (e) { | ||
352 | + logger.error('redis.hmgetAsync.category.description:' + e); | ||
353 | + } | ||
352 | } | 354 | } |
353 | 355 | ||
354 | let categoryIntro = categoryIntroRedis[1] ? { | 356 | let categoryIntro = categoryIntroRedis[1] ? { |
-
Please register or login to post a comment