Merge pull request #3196 from kialam/detect-empty-artifacts

Job Artifacts: check for empty object rather than string value.

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot]
2019-02-11 15:21:07 +00:00
committed by GitHub

View File

@@ -579,8 +579,8 @@ function getExtraVarsDetails () {
function getArtifactsDetails (val) {
const artifacts = val || resource.model.get('artifacts');
if (!artifacts || artifacts === '{}') {
if (!artifacts || (Object.entries(artifacts).length === 0 &&
artifacts.constructor === Object)) {
return null;
}