-
Notifications
You must be signed in to change notification settings - Fork 6
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
[#2684] Remove/replace display_name (roepnaam) #1362
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1362 +/- ##
===========================================
+ Coverage 95.19% 95.20% +0.01%
===========================================
Files 1002 1005 +3
Lines 37029 37169 +140
===========================================
+ Hits 35248 35388 +140
Misses 1781 1781 ☔ View full report in Codecov by Sentry. |
@pi-sigma This was much more back-end than I expected, so hopefully I didn't remove too much from the tests... |
src/open_inwoner/accounts/models.py
Outdated
@@ -367,7 +360,7 @@ def get_short_name(self): | |||
|
|||
@property | |||
def call_name(self): | |||
return self.display_name or self.first_name | |||
return self.first_name or self.first_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"return a or a" is redundant. Context: I introduced call_name
to show either the display_name
or the first_name
, in case the display_name
was not set. Now that we're getting rid of the model field display_name
, I suggest renaming the propery to "display_name" and return the first name for now. If some municipalities decide they want to display user names in a different way, we can easily customize it:
@property
def display_name(self)
return self.first_name
You'll need to change it in profile/me.html
as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pi-sigma Ah yes, but I removed the Display name field from there completely, since it already has a separate field for first name. Or does this mean we need to use display_name everywhere instead of the first_name? Like in me.html
, mydata.html
and edit.html
?
src/open_inwoner/components/templates/components/Header/Header.html
Outdated
Show resolved
Hide resolved
src/open_inwoner/components/templates/components/Header/NavigationAuthenticated.html
Outdated
Show resolved
Hide resolved
c98015e
to
af7276e
Compare
2aa9aa7
to
64dd234
Compare
@pi-sigma I think this looks good now, thanks 😊 |
Taiga:
https://taiga.maykinmedia.nl/project/open-inwoner/task/2684
See also previous issue:
#1270