Fixes the user arguments json field decoding (#5307)

This commit is contained in:
Trenton H 2024-01-07 14:17:51 -08:00 committed by GitHub
parent d46abeff01
commit ea47af7034
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,5 @@
import logging
from django.contrib.auth.models import Group
from django.contrib.auth.models import Permission
from django.contrib.auth.models import User
@ -5,6 +7,8 @@ from rest_framework import serializers
from paperless.models import ApplicationConfiguration
logger = logging.getLogger("paperless.settings")
class ObfuscatedUserPasswordField(serializers.Field):
"""
@ -118,6 +122,8 @@ class ProfileSerializer(serializers.ModelSerializer):
class ApplicationConfigurationSerializer(serializers.ModelSerializer):
user_args = serializers.JSONField(binary=True)
class Meta:
model = ApplicationConfiguration
fields = "__all__"