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

dupe profile cleanup part 2 #2696

Merged
merged 2 commits into from
Nov 7, 2018
Merged

Conversation

owocki
Copy link
Contributor

@owocki owocki commented Nov 5, 2018

Description

duplicate profiles, but now also handles:

  • profiles with case sesnsitivity issues
  • profiles with @ signs in front of them
Checklist
  • linter status: 100% pass
  • changes don't break existing behavior
  • commit message follows commit guidelines
Affected core subsystem(s)
Testing

tested:

kennethashley
market protocol
pelsasser

Refers/Fixes

self

app/dashboard/management/commands/cleanup_dupe_profiles.py Outdated Show resolved Hide resolved
profile.handle = profile.handle.replace('@', '')
profile.save()

dupes = Profile.objects.exclude(handle=None).annotate(handle_lower=Lower("handle")).values('handle_lower').annotate(handle_lower_count=Count('handle_lower')).filter(handle_lower_count__gt=1)

Choose a reason for hiding this comment

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

E501 line too long (198 > 120 characters)

app/dashboard/views.py Outdated Show resolved Hide resolved
@owocki
Copy link
Contributor Author

owocki commented Nov 7, 2018

note: even better than cleaning up duplicate profiles would be to figure out how/why the usernameSPACE or @username profiles are created and fix the root cause for that. unfortunately.. i dont have any leads on that though

@codecov
Copy link

codecov bot commented Nov 7, 2018

Codecov Report

Merging #2696 into master will decrease coverage by 0.02%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2696      +/-   ##
=========================================
- Coverage   29.93%   29.9%   -0.03%     
=========================================
  Files         162     162              
  Lines       13052   13064      +12     
  Branches     1743    1745       +2     
=========================================
  Hits         3907    3907              
- Misses       9021    9033      +12     
  Partials      124     124
Impacted Files Coverage Δ
app/dashboard/views.py 12.93% <0%> (ø) ⬆️
app/app/utils.py 22.32% <0%> (-0.11%) ⬇️
...board/management/commands/cleanup_dupe_profiles.py 0% <0%> (ø) ⬆️

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 e5d0b3c...dce49eb. Read the comment docs.

Copy link
Member

@thelostone-mc thelostone-mc left a comment

Choose a reason for hiding this comment

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

lgtm

@thelostone-mc thelostone-mc merged commit c6a5959 into master Nov 7, 2018
@thelostone-mc thelostone-mc deleted the kevin/dupe_profile_cleanup_part_2 branch November 7, 2018 21:57
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.

4 participants