Enhancement: support custom fields in post_document endpoint (#6222)

This commit is contained in:
shamoon 2024-03-30 13:00:53 -07:00 committed by GitHub
parent 41fc11efff
commit 129933ff30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 50 additions and 0 deletions

View file

@ -930,6 +930,7 @@ class PostDocumentView(GenericAPIView):
title = serializer.validated_data.get("title")
created = serializer.validated_data.get("created")
archive_serial_number = serializer.validated_data.get("archive_serial_number")
custom_field_ids = serializer.validated_data.get("custom_fields")
t = int(mktime(datetime.now().timetuple()))
@ -957,6 +958,7 @@ class PostDocumentView(GenericAPIView):
created=created,
asn=archive_serial_number,
owner_id=request.user.id,
custom_field_ids=custom_field_ids,
)
async_task = consume_file.delay(