Add check for null 'endorsed_by' in discussion requested_fields=profile_image

Description

Logically if endorsed=True then 'endorsed_by' should not be null.
But due to old discussion data in both stage and prod; the api is crashing if above is not satisfied.

We need to ad an additional check to skip any null 'endorsed_by'.

Steps to Reproduce

None

Reason for Variance

None

Release Notes

None

Status

Assignee

Wajeeha Khalid

Reporter

Wajeeha Khalid

Labels

None

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Sub-Team(s)

None

Reach

None

Impact

None

Open edX Discourse Thread

None

Platform Map Area (Levels 1 & 2)

None

Platform Map Area (Levels 3 & 4)

None

Story Points

0.5

Epic Link

Components

Sprint

None

Priority

CAT-2
Configure