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 for empty github notification #622

Merged
merged 1 commit into from
Mar 14, 2018
Merged

fix for empty github notification #622

merged 1 commit into from
Mar 14, 2018

Conversation

owocki
Copy link
Contributor

@owocki owocki commented Mar 14, 2018

Description

fix for
http://bits.owocki.com/0m450K2E0S3t/Screen%20Shot%202018-03-13%20at%206.01.19%20PM.png
JoinColony/colonyNetwork#174 (comment)

Checklist
  • linter status: 100% pass
  • changes don't break existing behavior
  • commit message follows commit guidelines
Affected core subsystem(s)

notifications

Testing

tested it

@@ -297,6 +297,9 @@ def build_profile_pairs(bounty):
"""
profile_handles = []
for fulfillment in bounty.fulfillments.select_related('profile').all().order_by('pk'):
if fulfillment.profile and fulfillment.profile.handle and fulfillment.profile.absolute_url:
if fulfillment.profile and fulfillment.profile.handle.strip() and fulfillment.profile.absolute_url:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should make " " falsy

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need .strip() 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.

the reason i did that is that this comment ( http://bits.owocki.com/0m450K2E0S3t/Screen%20Shot%202018-03-13%20at%206.01.19%20PM.png ) seems to have whitespace in it.. otherwise how did it pass the fulfillment.profile and fulfillment.profile.handle and fulfillment.profile.absolute_url check?

@codecov
Copy link

codecov bot commented Mar 14, 2018

Codecov Report

Merging #622 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #622      +/-   ##
==========================================
- Coverage   33.99%   33.97%   -0.02%     
==========================================
  Files          92       92              
  Lines        5051     5053       +2     
  Branches      584      584              
==========================================
  Hits         1717     1717              
- Misses       3267     3269       +2     
  Partials       67       67
Impacted Files Coverage Δ
app/dashboard/utils.py 22.75% <0%> (-0.28%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6afe87a...7e22d0c. Read the comment docs.

@@ -297,6 +297,9 @@ def build_profile_pairs(bounty):
"""
profile_handles = []
for fulfillment in bounty.fulfillments.select_related('profile').all().order_by('pk'):
if fulfillment.profile and fulfillment.profile.handle and fulfillment.profile.absolute_url:
if fulfillment.profile and fulfillment.profile.handle.strip() and fulfillment.profile.absolute_url:
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need .strip() here?

profile_handles.append((fulfillment.profile.handle, fulfillment.profile.absolute_url))
else:
addr = f"https://etherscan.io/address/{fulfillment.fulfiller_address}"
profile_handles.append((fulfillment.fulfiller_address, addr))
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@mbeacom mbeacom added bug This is something that isn't working as intended. backend This needs backend expertise. notifications labels Mar 14, 2018
Copy link
Contributor

@mbeacom mbeacom left a comment

Choose a reason for hiding this comment

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

lgtm :shipit:

@owocki owocki merged commit ba8a2c9 into master Mar 14, 2018
@mbeacom mbeacom deleted the kevin/address branch March 14, 2018 14:53
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants