Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

A partner associated member not public crashes member's page #577

Open
brettski opened this issue Jul 29, 2020 · 4 comments
Open

A partner associated member not public crashes member's page #577

brettski opened this issue Jul 29, 2020 · 4 comments
Labels
bug Something isn't working data Requires data changes

Comments

@brettski
Copy link
Collaborator

Describe the bug
For a user to be featured (PublicProfile type in api) the canFeature field must be true.
This is also a requirement for when members are associated with a partner and displayed on the partner page. We verify they are public before adding them.

The issue is that the member can, at any time, change the canFeature setting to false, and when they do this the partner page crashes.

What is expected is that either:
a. the user cannot change canFeature if they are associated with a partner
or
b. or the partner page doesn't blow up with this condition
or
c. something smart you think of

@brettski brettski added the bug Something isn't working label Jul 29, 2020
@saragibby
Copy link
Contributor

It looks like when the query for partner data is returning a null for the member who is no longer public. This null is causing the error as the code accepts members to return an array of members.

Instead of adjusting the frontend could the backend not return a null record in this array?

@brettski
Copy link
Collaborator Author

Are you able to provide the GraphQL query being used? Thank you

@saragibby
Copy link
Contributor

As an example, I updated my profile to be private (will leave in place for testing). Now when I run the below query I see a null in the members array. When my profile is public, my data is included in the members array and there is no null.

query getPartners {
  partners {
      partner(findBy: { slug: "that-sample" }) {
        id
        slug
        companyName
        members {
          id
          firstName
          lastName
          jobTitle
          partnerFeaturedOrder
          profileImage
        }
      }
  }
}

@brettski
Copy link
Collaborator Author

Thank you for the query. I will investigate deeper soon. You can make your profile public again if you wish.

@saragibby saragibby added the data Requires data changes label Oct 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working data Requires data changes
Projects
None yet
Development

No branches or pull requests

2 participants