-
Notifications
You must be signed in to change notification settings - Fork 2
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
No se renderizaba el contenido del email si no se encontraba idioma #167
Merged
Conversation
This file contains 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
lcbautista
force-pushed
the
61462_fix_localize_requires_language
branch
from
August 8, 2024 09:15
21efdb0
to
edc9948
Compare
lcbautista
changed the title
61462 fix localize requires language
No se renderizaba el contenido del email si no se encontraba idioma
Aug 8, 2024
PY2TestsResults76 tests 76 ✅ 1m 45s ⏱️ Results for commit 84fa7ad. |
PY3TestsResults76 tests 76 ✅ 1m 40s ⏱️ Results for commit 84fa7ad. |
AdriaGual
approved these changes
Aug 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
Comportamiento antiguo
Si al evaluar el registro no se encontraba idioma (False), no se podía renderizar el cuerpo del correo (tampoco los destinatarios)
Comportamiento nuevo
Aunque no se encuentre el idioma según el registro, se renderiza el correo en función del idioma por defecto del ERP
También se ha añadido un campo en el asistente que visualiza el idioma, para detectar que idioma se está obteniendo:
Origen del error
#163
Descripción del error
La nueva clase
Localize
necesita obligatoriamente un idioma para poder funcionar. Cuando se evalúa el idioma y el registro en cuestión no tiene (False), el resultado del idioma de la plantilla es "False" (string). Este "idioma" se pasa al resto de variables a evaluar (body, cc, bcc, etc) el cual no es un idioma existente por lo que la claseLocalize
falla al instanciarse.