Fix bug when exposing non existing artifacts

Merged Fabio Pitino requested to merge fix-no-artifacts-when-exposed into master

What does this MR do?

Related issue: #121990 (closed)

This MR fixes a bug that occurs when expose_as is used and no artifacts are produced by the job.

Errors were reported in Sentry:

Does this MR meet the acceptance criteria?


Edited by Fabio Pitino