Fix upload artifact (#852)
* fixed repository to check for file existence before trying to get the artifact * added additional existence checks before retrieving the artifact from repository Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>
This commit is contained in:
committed by
Jeroen Laverman
parent
34fc7a7012
commit
568848bb27
@@ -64,7 +64,9 @@ public class MgmtDownloadResource implements MgmtDownloadRestApi {
|
||||
AbstractDbArtifact artifact = null;
|
||||
|
||||
if (DownloadType.BY_SHA1 == artifactCache.getDownloadType()) {
|
||||
artifact = artifactRepository.getArtifactBySha1(tenant, artifactCache.getId());
|
||||
artifact = artifactRepository.existsByTenantAndSha1(tenant, artifactCache.getId())
|
||||
? artifactRepository.getArtifactBySha1(tenant, artifactCache.getId())
|
||||
: null;
|
||||
} else {
|
||||
LOGGER.warn("Download Type {} not supported", artifactCache.getDownloadType());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user