Repository navigation
Conversation
This branch has not been deployed
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.
Resumen
Corrige dos casos borde en el manejo y validación del RUT en
ApiClient:create_linkignoraba valores explícitos falsy ('',0,False) cuandoself.rutestaba configuradoset_contribuyente(rut if rut is not None else ...),create_linkusabavalor = rut or self.rut.self.rut) y se llamabacreate_link(recurso, rut='')ocreate_link(recurso, rut=0), se omitía silenciosamente el argumento inválido y se generaba el enlace paraself.ruten vez de lanzarApiException.Validación consistente del RUT en
_parsear_rut(set_contribuyenteycreate_link)boolhereda deint, por lo queset_contribuyente(True)asignabaself.rut = 1.0,-76192083) o textos mal formados con guion ('76192083-','1-2-3') eran aceptados al hacersplit('-')[0]y convertir conint(...)._parsear_rut, exigiendo entero positivo (nobool) y dígito verificador válido (0-9oK/k) cuando viene separado por-.Verificación
tests/api_client/test_configuracion.pyytests/api_client/test_url.py.python -m unittest discover -s tests/api_client -v: 31 passed.ruff check .ymypy libredte tests: 0 errores / 0 advertencias.