Repository navigation
[18.0][FIX] brand_external_report_layout: avoid empty SCSS attachment when no brand exists - #330
Open
SamyShaawat wants to merge 1 commit into
Conversation
…no brand exists The generated res.brand.scss attachment was empty when there was no res.brand record, so the assets compiler failed with 'Could not get content for ...asset_styles_brand_report.scss' and the document layout preview never loaded. Fall back to a placeholder comment.
Contributor
|
Hi @sbejaoui, |
Author
|
Hi @sbejaoui, could you please review this fix? Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #328
When no
res.brandrecord exists,styles_brand_reportrenders nothing, so theres.brand.scssattachment is empty. The assets compiler then fails withCould not get content for /brand_external_report_layout/static/src/legacy/scss/asset_styles_brand_report.scssand the Document Layout preview never loads._get_asset_style_b64()now falls back to a placeholder comment when the rendered SCSS is blank. Both the install-time data record and_update_asset_style()use this method, so one guard covers both.Added
test_asset_style_not_empty_without_brand; it fails without the fix and passes with it.