lists.arthurdejong.org
RSS feed

python-stdnum branch master updated. 1.10-13-g0fc0c30

[Date Prev][Date Next] [Thread Prev][Thread Next]

python-stdnum branch master updated. 1.10-13-g0fc0c30



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-stdnum".

The branch, master has been updated
       via  0fc0c3055f03734eb6c29f67b4a49ff5117a7e52 (commit)
      from  b4773ae4117275acddfa947150633da458d2625e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://arthurdejong.org/git/python-stdnum/commit/?id=0fc0c3055f03734eb6c29f67b4a49ff5117a7e52

commit 0fc0c3055f03734eb6c29f67b4a49ff5117a7e52
Author: Andrés R <androdriguez14@gmail.com>
Date:   Mon Feb 11 17:31:19 2019 -0400

    Return only first response from DGII lookup
    
    This fixes an issue when response for check_dgii() comes with 2 records
    instead of one for same RNC.
    
    Closes https://github.com/arthurdejong/python-stdnum/pull/95

diff --git a/stdnum/do/rnc.py b/stdnum/do/rnc.py
index 109e9ff..7506c95 100644
--- a/stdnum/do/rnc.py
+++ b/stdnum/do/rnc.py
@@ -148,7 +148,8 @@ def check_dgii(number, timeout=30):  # pragma: no cover
         result = result['GetContribuyentesResult']  # PySimpleSOAP only
     if result == '0':
         return
-    return _convert_result(result)
+    result = [x for x in result.split('@@@')]
+    return _convert_result(result[0])
 
 
 def search_dgii(keyword, end_at=10, start_at=1, timeout=30):  # pragma: no 
cover

-----------------------------------------------------------------------

Summary of changes:
 stdnum/do/rnc.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
python-stdnum
-- 
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
https://lists.arthurdejong.org/python-stdnum-commits/