Skip to content

Commit

Permalink
Fix find release for bugsnag
Browse files Browse the repository at this point in the history
  • Loading branch information
nid90 committed Oct 26, 2023
1 parent 7c2cd88 commit 97b9f53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/libs/installations/bugsnag/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def find_release(project_id, release_stage, app_version, app_version_code, trans

releases
.filter { |r| r.app_version == app_version && (r.app_version_code == app_version_code || r.app_bundle_version == app_version_code) }
.then { _1&.merge(total_sessions_count_in_last_24h: releases.pluck(:sessions_count_in_last_24h).sum) }
.map { _1.merge(total_sessions_count_in_last_24h: releases.pluck(:sessions_count_in_last_24h).sum) }
.then { Installations::Response::Keys.transform(_1, transforms) }
.first
end
Expand Down Expand Up @@ -70,6 +70,7 @@ def execute
yield
rescue => e
elog(e)
nil
end
end
end

0 comments on commit 97b9f53

Please sign in to comment.