From f0e8cbb36956f89e53f5484b0a4668ca656c9ca1 Mon Sep 17 00:00:00 2001 From: APiankouski <109206864+APiankouski@users.noreply.github.com> Date: Wed, 25 Oct 2023 11:03:28 +0300 Subject: [PATCH] Hotfix 5.10.1 (#1837) * EPMRPP-87223 || Fix duplicated logs --- .github/workflows/release.yml | 2 +- .../ws/rabbit/AsyncReportingListener.java | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6d1335791..11f7c0cd29 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ on: env: GH_USER_NAME: github.actor - RELEASE_VERSION: 5.10.0 + RELEASE_VERSION: 5.10.1 REPOSITORY_URL: 'https://maven.pkg.github.com/' jobs: diff --git a/src/main/java/com/epam/ta/reportportal/ws/rabbit/AsyncReportingListener.java b/src/main/java/com/epam/ta/reportportal/ws/rabbit/AsyncReportingListener.java index bccbac8713..574610eeef 100644 --- a/src/main/java/com/epam/ta/reportportal/ws/rabbit/AsyncReportingListener.java +++ b/src/main/java/com/epam/ta/reportportal/ws/rabbit/AsyncReportingListener.java @@ -296,14 +296,16 @@ private void createItemLog(SaveLogRQ request, TestItem item, BinaryDataMetaInfo Launch effectiveLaunch = testItemService.getEffectiveLaunch(item); logService.saveLogMessageToElasticSearch(log, effectiveLaunch.getId()); - saveAttachment(request.getFile().getName(), metaInfo, - log.getId(), - projectId, - effectiveLaunch.getId(), - item.getItemId(), - effectiveLaunch.getUuid(), - log.getUuid() - ); + if (Objects.nonNull(request.getFile())) { + saveAttachment(request.getFile().getName(), metaInfo, + log.getId(), + projectId, + effectiveLaunch.getId(), + item.getItemId(), + effectiveLaunch.getUuid(), + log.getUuid() + ); + } } private void createLaunchLog(SaveLogRQ request, Launch launch, BinaryDataMetaInfo metaInfo,