internal/postgres: check for non-empty good version
In unitExistsAtLatest, check that latest_module_versions.good_version
is non-empty before using it.
Trust: Jonathan Amsterdam
Run-TryBot: Jonathan Amsterdam
TryBot-Result: kokoro
@@ -265,7 +265,7 @@ func (db *DB) unitExistsAtLatest(ctx context.Context, unitPath, modulePath strin
if err != nil {
return false, err
}
- if lmv != nil {
+ if lmv != nil && lmv.GoodVersion != "" {
// If we have latest-version info, use it.
latestGoodVersion = lmv.GoodVersion
} else {
