mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Remove display_name property
This commit is contained in:
parent
c73688d167
commit
d15c701510
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"user_id": 1,
|
"user_id": 1,
|
||||||
"username": "admin",
|
"username": "admin",
|
||||||
"display_name": "Admin",
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"language": "",
|
"language": "",
|
||||||
"bulk_edit": {
|
"bulk_edit": {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"user_id": 1,
|
"user_id": 1,
|
||||||
"username": "admin",
|
"username": "admin",
|
||||||
"display_name": "Admin",
|
|
||||||
"settings": {
|
"settings": {
|
||||||
"language": "",
|
"language": "",
|
||||||
"bulk_edit": {
|
"bulk_edit": {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
export interface PaperlessUiSettings {
|
export interface PaperlessUiSettings {
|
||||||
user_id: number
|
user_id: number
|
||||||
username: string
|
username: string
|
||||||
display_name: string
|
|
||||||
settings: Object
|
settings: Object
|
||||||
permissions: string[]
|
permissions: string[]
|
||||||
}
|
}
|
||||||
|
@ -872,9 +872,6 @@ class UiSettingsView(GenericAPIView):
|
|||||||
serializer.is_valid(raise_exception=True)
|
serializer.is_valid(raise_exception=True)
|
||||||
|
|
||||||
user = User.objects.get(pk=request.user.id)
|
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 = {}
|
ui_settings = {}
|
||||||
if hasattr(user, "ui_settings"):
|
if hasattr(user, "ui_settings"):
|
||||||
ui_settings = user.ui_settings.settings
|
ui_settings = user.ui_settings.settings
|
||||||
@ -891,7 +888,6 @@ class UiSettingsView(GenericAPIView):
|
|||||||
{
|
{
|
||||||
"user_id": user.id,
|
"user_id": user.id,
|
||||||
"username": user.username,
|
"username": user.username,
|
||||||
"display_name": displayname,
|
|
||||||
"settings": ui_settings,
|
"settings": ui_settings,
|
||||||
"permissions": roles,
|
"permissions": roles,
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user