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

Unnecessary parameters in API cause MultipleObjectsReturned #2171

Closed
KasperBrandt opened this issue May 12, 2016 · 1 comment
Closed

Unnecessary parameters in API cause MultipleObjectsReturned #2171

KasperBrandt opened this issue May 12, 2016 · 1 comment

Comments

@KasperBrandt
Copy link
Contributor

KasperBrandt commented May 12, 2016

See http://sentry.support.akvo-ops.org/rsr/live/group/887/.

  • /rest/v1/project_extra/2649/ works fine.
  • /rest/v1/project_extra/2649/?partners=1 returns a MultipleObjectsReturned error.

In these cases, the parameter should be ignored. There are exceptions though, such as the limit parameter (and maybe more?).

@KasperBrandt KasperBrandt added this to the 3.14 Riga milestone May 12, 2016
@KasperBrandt KasperBrandt changed the title Unnecessary parameters in API gives MultipleObjectsReturned Unnecessary parameters in API cause MultipleObjectsReturned May 12, 2016
@damienallen
Copy link
Contributor

Test plan

API calls for where PK is specified should no longer raise an error when unnecessary query strings are appended to the URL (they are simply ignored). The following pages should both load without issue:

  • /rest/v1/project_extra/2649/
  • /rest/v1/project_extra/2649/?partners=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants