From 9a094b875373e282f750f9121458d1a26acf19a6 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 31 Mar 2022 10:00:29 +0100 Subject: Package description can be empty string Which means it's omitted from the cache file, result in nullopt value; default this to empty --- gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp index 11cfcc2..441f46f 100644 --- a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp +++ b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp @@ -85,7 +85,7 @@ namespace Gentoo::Service { // Maybe create a package auto pi = sql::maintenance::packageInsert.modify(dbc); pi->bindParamS(0, packageName); - pi->bindParamS(1, ecp.get("DESCRIPTION")); + pi->bindParamS(1, ecp.getRange("DESCRIPTION").value_or("")); pi->bindParamS(2, packageName); pi->bindParamS(3, categoryName); pi->execute(); @@ -263,7 +263,7 @@ namespace Gentoo::Service { dbc->patchTable(&t); // Description auto u = sql::maintenance::packageDescUpdate.modify(dbc); - u->bindParamS(0, ecp.get("DESCRIPTION")); + u->bindParamS(0, ecp.getRange("DESCRIPTION").value_or("")); u->bindParamI(1, packageId); u->execute(); } -- cgit v1.2.3