Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Items not being fetched with a user that is not a manager of a TP #494

Merged
merged 3 commits into from
Apr 13, 2022

Conversation

LautaroPetaccio
Copy link
Contributor

@LautaroPetaccio LautaroPetaccio commented Apr 13, 2022

This PR fixes an issue that occurred when requesting the items of a user that wasn't a manager of a third party. The endpoint was returning [] for those cases.

}

const thirdPartyIds = thirdParties.map((thirdParty) => thirdParty.id)
const thirdPartyIds = thirdParties.map((thirdParty: any) => thirdParty.id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why any here :( ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to delete it, it was for testing purposes.

@@ -54,7 +54,6 @@ export const thirdPartyFragment = () => gql`
root
managers
maxItems
totalItems
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we remove it from ThirdPartyFragment too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do! Great catch!

@coveralls
Copy link

coveralls commented Apr 13, 2022

Pull Request Test Coverage Report for Build 2163495409

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 69.325%

Totals Coverage Status
Change from base Build 2162966245: 0.02%
Covered Lines: 2461
Relevant Lines: 3400

💛 - Coveralls

@LautaroPetaccio LautaroPetaccio merged commit af42512 into master Apr 13, 2022
@LautaroPetaccio LautaroPetaccio deleted the fix/items-by-address-no-tp-manager branch April 13, 2022 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants