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

Adjust lazy_load_kudos to catch nonexistent profile #2657

Merged
merged 1 commit into from
Oct 31, 2018

Conversation

mbeacom
Copy link
Contributor

@mbeacom mbeacom commented Oct 31, 2018

Description

The goal of this PR is to resolve the exception encountered in: #2655 when attempting to query for a profile that doesn't exist in lazy_load_kudos

Checklist
  • linter status: 100% pass
  • changes don't break existing behavior
  • commit message follows commit guidelines
Testing

Local

Refers/Fixes

Fix #2655

@mbeacom mbeacom added bug This is something that isn't working as intended. backend This needs backend expertise. Gitcoin Kudos Gitcoin Kudos labels Oct 31, 2018
@mbeacom mbeacom self-assigned this Oct 31, 2018
@octavioamu
Copy link
Contributor

LGTM , tested in my local

@@ -1202,22 +1202,25 @@ def profile(request, handle):
@csrf_exempt
def lazy_load_kudos(request):
page = request.POST.get('page', 1)
address = request.POST.get('address')
context = {}
datarequest = request.POST.get('request')
order_by = request.GET.get('order_by', '-modified_on')
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like the order was removed from the front end so if we are not going to have it there is not need to have it in the request

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'll remove it in a follow up. Thanks for the heads up!

@mbeacom mbeacom merged commit a6ec332 into master Oct 31, 2018
@mbeacom mbeacom deleted the fix-2655-lazyload branch October 31, 2018 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend This needs backend expertise. bug This is something that isn't working as intended. Gitcoin Kudos Gitcoin Kudos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't assume a profile will exist without catching with try/except
2 participants