mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
fix key constraint error
This commit is contained in:
parent
a697eb8530
commit
321e0ced2a
@ -515,5 +515,8 @@ class FrontendSettingsViewSerializer(serializers.ModelSerializer):
|
|||||||
return instance
|
return instance
|
||||||
|
|
||||||
def create(self, validated_data):
|
def create(self, validated_data):
|
||||||
frontend_settings = FrontendSettings.objects.update_or_create(**validated_data)
|
frontend_settings = FrontendSettings.objects.update_or_create(
|
||||||
|
user=validated_data.get("user"),
|
||||||
|
defaults={"settings": validated_data.get("settings", None)},
|
||||||
|
)
|
||||||
return frontend_settings
|
return frontend_settings
|
||||||
|
Loading…
x
Reference in New Issue
Block a user