mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-30 18:27:45 -05:00
Add "Created" as additional (optional) parameter for post_documents (#965)
* Added "created" as optional parameter for post_documents. * Fixed Conflict * After Black Reformatting * Run "add-trailing-comma" * The right order between black and trailing comma is important.... * Added required=False * Adds unit test for optional created in document api POST * Fixes adding of settings override * And a mis-added print, sigh Co-authored-by: Philipp <philipp@invalid.invalid> Co-authored-by: Trenton Holmes <holmes.trenton@gmail.com>
This commit is contained in:
@@ -504,6 +504,7 @@ class PostDocumentView(GenericAPIView):
|
||||
document_type_id = serializer.validated_data.get("document_type")
|
||||
tag_ids = serializer.validated_data.get("tags")
|
||||
title = serializer.validated_data.get("title")
|
||||
created = serializer.validated_data.get("created")
|
||||
|
||||
t = int(mktime(datetime.now().timetuple()))
|
||||
|
||||
@@ -530,6 +531,7 @@ class PostDocumentView(GenericAPIView):
|
||||
override_tag_ids=tag_ids,
|
||||
task_id=task_id,
|
||||
task_name=os.path.basename(doc_name)[:100],
|
||||
override_created=created,
|
||||
)
|
||||
|
||||
return Response("OK")
|
||||
|
Reference in New Issue
Block a user