Repository navigation
[refactor] Attachment images - #11961
Conversation
- is_image - thumbnail
- Don't need is_image field - Can introspect from the thumbnail
✅ Deploy Preview for inventree-web-pui-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (92.70%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #11961 +/- ##
==========================================
- Coverage 91.37% 91.23% -0.14%
==========================================
Files 976 971 -5
Lines 51733 51103 -630
==========================================
- Hits 47269 46626 -643
- Misses 4464 4477 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
matmair
left a comment
There was a problem hiding this comment.
LGTM overall; if we want to change attachments meaningfully in 1.4.0 I would have some larger points worth adressing
…ree into attachment-images
…ree into attachment-images
* Add new Attachment model fields: - is_image - thumbnail * Cache if the attachment is an image * Add new setting for controlling max upload size * Validate uploaded attachment file * Add tqdm for progress bars * Refactor migrations - Don't need is_image field - Can introspect from the thumbnail * Data migration for existing attachments * Bump API version * Update tests and validators * Add "is_image" field to the Attachment model * Offload to background task * Implement unit tests * Docs * Add unit test for data migration * Additional unit test * Omit migration tests from code coverage * Additional unit tests
* Add new Attachment model fields: - is_image - thumbnail * Cache if the attachment is an image * Add new setting for controlling max upload size * Validate uploaded attachment file * Add tqdm for progress bars * Refactor migrations - Don't need is_image field - Can introspect from the thumbnail * Data migration for existing attachments * Bump API version * Update tests and validators * Add "is_image" field to the Attachment model * Offload to background task * Implement unit tests * Docs * Add unit test for data migration * Additional unit test * Omit migration tests from code coverage * Additional unit tests
|
Hi |

This PR adds / refactors some functionality related to attachments
References
Changes
Rationale
This forms the first part of a re-think of how we might approach generic images against any model instance - see #10484
However, none of that will be implemented here - this is a low-scope change to allow discrimination of attachments which are also images, and display them as such in the UI
Tasks
Future Work (Potentially, TBD)
django-stdimageand migrate todjango-picture#11647