-
Notifications
You must be signed in to change notification settings - Fork 378
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
feat: replace references to User with references to Person #6024
Conversation
* refactor: Change CommunityList reference from User to Person * refactor: Convert more user references to person * refactor: Change augment_docs_and_user_with_user_info to person * refactor: Change Nomination and Feedback references from User to Person * refactor: Change a few test case function signatures to be more pythonic
…he URL This only happens using the form-filling and submission feature of WebTest, which is only used in this one test case, so just it rip out.
refactor: Rework community views to operate on Person instead of User
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #6024 +/- ##
==========================================
+ Coverage 88.80% 88.91% +0.11%
==========================================
Files 285 289 +4
Lines 40383 40454 +71
==========================================
+ Hits 35862 35971 +109
+ Misses 4521 4483 -38 ☔ View full report in Codecov by Sentry. |
Leaving some notes here from a deep dive into the edge cases. There are users without persons. These migrations currently would lose some data about who (for a very poor value of who - all we would lose is a username since there's no person connected already) made nominations in very old nomcoms. That data is supposed to have been removed already anyhow, so I'm not particularly concerned about that. There are communitylists attacted to users without persons. Unless these also have EmailSubscriptions, they don't do anything anyhow and deleting them is safe. There is only one that has an EmailSubscription attached at the moment. I'll appoach the owner and adjust that one away. Then we should add explicitly removing the personless objects instead of migrating them to person=None - the migrations will need to be updated. |
# Conflicts: # ietf/community/tests.py # ietf/community/views.py # ietf/templates/doc/document_draft.html # ietf/templates/doc/search/search_result_row.html # requirements.txt
…erson chore: Merge main into feat/user2person
* fix: Use refactored method * fix: Don't assume user has person * fix: Use new view param name
This appears to have been done. On production: >>> CommunityList.objects.filter(user__person__isnull=True).exclude(user__isnull=True).exclude(emailsubscription__isnull=True).count()
0 |
Looks like there are only 5 nominations affected if I'm understanding this correctly. The most recent was in 2018. datatracker=> SELECT COUNT(*)
datatracker-> FROM nomcom_nomination nom
datatracker-> LEFT OUTER JOIN person_person p USING (user_id)
datatracker-> WHERE nom.user_id IS NOT NULL
datatracker-> AND p.id IS NULL;
count
-------
5
(1 row) There are also 51 nominations with no |
Looks like there are also 199 |
* fix: Don't assume user has person * fix: user->person in update_community_list_index.py * feat: Remove CommunityLists without Person * refactor: Speed up nomcom migrations
No description provided.