Skip to content

Check null sentiments when calculating average sentiment#943

Merged
epipav merged 1 commit intomainfrom
bugfix/check-null-sentiment
Jun 5, 2023
Merged

Check null sentiments when calculating average sentiment#943
epipav merged 1 commit intomainfrom
bugfix/check-null-sentiment

Conversation

@epipav
Copy link
Copy Markdown
Collaborator

@epipav epipav commented Jun 5, 2023

Changes proposed ✍️

  • When sentiment is null (possibly can happen with the new integration framework, some LinkedIn integration had null sentiment) member findById was throwing an error - Now we ignore null sentiments from the calculation.

What

🤖 Generated by Copilot at 09ec5c1

Fixed a potential bug in memberRepository.ts that could cause an error when calculating the sentiment score of a member. Added a null check for i.sentiment before accessing its sentiment property.

🤖 Generated by Copilot at 09ec5c1

i.sentiment check
avoids error in winter
calm sentiment score

Why

How

🤖 Generated by Copilot at 09ec5c1

  • Add a null check for i.sentiment before accessing its sentiment property to avoid errors when calculating the average sentiment score of a member's activities (link) in memberRepository.ts

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@epipav epipav marked this pull request as ready for review June 5, 2023 09:07
@epipav epipav requested a review from themarolt June 5, 2023 09:07
@epipav epipav self-assigned this Jun 5, 2023
@epipav epipav added the Bug Created by Linear-GitHub Sync label Jun 5, 2023
@epipav epipav merged commit bf81559 into main Jun 5, 2023
@epipav epipav deleted the bugfix/check-null-sentiment branch June 5, 2023 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Created by Linear-GitHub Sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants