Skip to content

Commit

Permalink
fix for #407 not existing because it was a not an
Browse files Browse the repository at this point in the history
  • Loading branch information
owocki committed Mar 9, 2018
1 parent b0e5dba commit 4c62fb4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,15 @@ def bounty_details(request, ghuser='', ghrepo='', ghissue=0):
_access_token = request.session.get('access_token')
profile_id = request.session.get('profile_id')
issueURL = 'https://github.com/' + ghuser + '/' + ghrepo + '/issues/' + ghissue if ghissue else request.GET.get('url')

# try the /pulls url if it doesnt exist in /issues
try:
assert Bounty.objects.current().filter(github_url=issueURL).exists()
except:
issueURL = 'https://github.com/' + ghuser + '/' + ghrepo + '/pull/' + ghissue if ghissue else request.GET.get('url')
print(issueURL)
pass

bounty_url = issueURL
params = {
'issueURL': issueURL,
Expand Down

0 comments on commit 4c62fb4

Please sign in to comment.