Remove display_name property

This commit is contained in:
Michael Shamoon 2022-12-07 14:59:27 -08:00
parent c73688d167
commit d15c701510
4 changed files with 0 additions and 7 deletions

View File

@ -1,7 +1,6 @@
{
"user_id": 1,
"username": "admin",
"display_name": "Admin",
"settings": {
"language": "",
"bulk_edit": {

View File

@ -1,7 +1,6 @@
{
"user_id": 1,
"username": "admin",
"display_name": "Admin",
"settings": {
"language": "",
"bulk_edit": {

View File

@ -1,7 +1,6 @@
export interface PaperlessUiSettings {
user_id: number
username: string
display_name: string
settings: Object
permissions: string[]
}

View File

@ -872,9 +872,6 @@ class UiSettingsView(GenericAPIView):
serializer.is_valid(raise_exception=True)
user = User.objects.get(pk=request.user.id)
displayname = user.username
if user.first_name or user.last_name:
displayname = " ".join([user.first_name, user.last_name])
ui_settings = {}
if hasattr(user, "ui_settings"):
ui_settings = user.ui_settings.settings
@ -891,7 +888,6 @@ class UiSettingsView(GenericAPIView):
{
"user_id": user.id,
"username": user.username,
"display_name": displayname,
"settings": ui_settings,
"permissions": roles,
},