Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor label/report template copying #6582

Merged
merged 57 commits into from
Feb 27, 2024

Conversation

matmair
Copy link
Member

@matmair matmair commented Feb 27, 2024

This PR is a first step towards #5841 and will help with #6478.
It factors out the ready() function of the report and label apps into a generic function that can also be used by plugins to ship their own default templating content.
This does not change the functionality around templating and is only a refactor to get functionality into one place.

@matmair matmair added report Report/Label generation refactor labels Feb 27, 2024
@matmair matmair added this to the 0.15.0 milestone Feb 27, 2024
@matmair matmair self-assigned this Feb 27, 2024
Copy link

netlify bot commented Feb 27, 2024

Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit b109f0c
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/65dd84ea89c5960008fdaa78

@matmair matmair marked this pull request as ready for review February 27, 2024 17:25
@SchrodingersGat SchrodingersGat modified the milestones: 0.15.0, 0.14.0 Feb 27, 2024
@SchrodingersGat
Copy link
Member

@matmair nice work, this will clean things up nicely for our future work

@SchrodingersGat SchrodingersGat merged commit 1199291 into inventree:master Feb 27, 2024
22 checks passed
@wolflu05
Copy link
Contributor

@matmair Does this also fixes the bug that if I change an InvenTree provided template, it gets crated again and I end up with duplicate templates?

@matmair matmair deleted the refactor-labels branch February 27, 2024 22:44
@matmair
Copy link
Member Author

matmair commented Feb 27, 2024

@wolflu05 no, it is a pure internal refactor. The behaviour you describe is a more nuanced problem and will have to be discussed as the current way templates are handled (file based) has some problems when interacting with an API.

@wolflu05
Copy link
Contributor

Ok. Yeah that's right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor report Report/Label generation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants