Skip to content

Allow dict for custom fields on document draft#570

Closed
cehser wants to merge 2 commits intotb1337:mainfrom
cehser:docdraft_custfields
Closed

Allow dict for custom fields on document draft#570
cehser wants to merge 2 commits intotb1337:mainfrom
cehser:docdraft_custfields

Conversation

@cehser
Copy link
Copy Markdown

@cehser cehser commented Feb 19, 2026

No description provided.

@cehser
Copy link
Copy Markdown
Author

cehser commented Feb 23, 2026

I had to change the serialization for dicts in order for this to work. However, this affected a test which I had to cut some lines off.

Please review carefully.

@tb1337
Copy link
Copy Markdown
Owner

tb1337 commented Mar 6, 2026

Thanks. Gonna review it soon.

@tb1337
Copy link
Copy Markdown
Owner

tb1337 commented Mar 6, 2026

I'm currently not sure how to handle that request with pypaperless current data model. Must think about it carefully.

@tb1337
Copy link
Copy Markdown
Owner

tb1337 commented Mar 12, 2026

Please check my changes in the breaking/rewrite-to-httpx-pydantic branch. I wanted to rewrite pypaperless to pydantic for years and so did I. Its still in dev but you could test if the behavior of uploading docs with custom field values is better now.

Be aware of the API changes of pypaperless, model classes no longer have business logic (save, update ...). You must use await paperless.documents.save( my_doc_class ) instead of await my_doc_class.save(), for example.

@tb1337 tb1337 closed this Mar 12, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants