This commit is contained in:
@@ -237,7 +237,7 @@ bool Database::get(const std::string& hash_or_labeltag, dbEntry& entry) {
|
||||
|
||||
// try with a :latest tag
|
||||
std::string with_latest = hash_or_labeltag + ":latest";
|
||||
return (run_sql_text("SELECT hash, labeltags, metadata FROM objects WHERE hash = ?;", with_latest, entry));
|
||||
return (run_sql_text("SELECT hash, labeltags, metadata FROM objects WHERE json_array_length(labeltags) > 0 AND EXISTS (SELECT 1 FROM json_each(labeltags) WHERE value = ?);", with_latest, entry));
|
||||
}
|
||||
|
||||
bool Database::list(std::vector<dbEntry>& entries) {
|
||||
|
Reference in New Issue
Block a user