mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-30 18:27:45 -05:00
Merge branch 'dev' into feature-frontend-task-queue
This commit is contained in:
@@ -324,6 +324,7 @@ class BulkEditSerializer(DocumentListSerializer):
|
||||
"remove_tag",
|
||||
"modify_tags",
|
||||
"delete",
|
||||
"redo_ocr",
|
||||
],
|
||||
label="Method",
|
||||
write_only=True,
|
||||
@@ -357,6 +358,8 @@ class BulkEditSerializer(DocumentListSerializer):
|
||||
return bulk_edit.modify_tags
|
||||
elif method == "delete":
|
||||
return bulk_edit.delete
|
||||
elif method == "redo_ocr":
|
||||
return bulk_edit.redo_ocr
|
||||
else:
|
||||
raise serializers.ValidationError("Unsupported method.")
|
||||
|
||||
@@ -537,8 +540,6 @@ class BulkDownloadSerializer(DocumentListSerializer):
|
||||
|
||||
|
||||
class StoragePathSerializer(MatchingModelSerializer):
|
||||
document_count = serializers.IntegerField(read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = StoragePath
|
||||
fields = (
|
||||
@@ -586,10 +587,6 @@ class UiSettingsViewSerializer(serializers.ModelSerializer):
|
||||
"settings",
|
||||
]
|
||||
|
||||
def update(self, instance, validated_data):
|
||||
super().update(instance, validated_data)
|
||||
return instance
|
||||
|
||||
def create(self, validated_data):
|
||||
ui_settings = UiSettings.objects.update_or_create(
|
||||
user=validated_data.get("user"),
|
||||
|
Reference in New Issue
Block a user