lists.arthurdejong.org
RSS feed

python-stdnum branch master updated. 1.10-3-g069279a

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

python-stdnum branch master updated. 1.10-3-g069279a



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  069279a0613a4ae767987d7d3d65fd27cb355490 (commit)
      from  e31ff954d46190e06a4473c7213ad386c3a75e24 (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=069279a0613a4ae767987d7d3d65fd27cb355490

commit 069279a0613a4ae767987d7d3d65fd27cb355490
Author: Christopher Ormaza <chris.ormaza@gmail.com>
Date:   Sat Nov 24 17:14:11 2018 -0500

    Support Cedula and RUC of foreigners
    
    Add the case of Cedulas and RUCs of foreigners in Ecuador, as
    Venezuelans and Colombians
    
    Closes https://github.com/arthurdejong/python-stdnum/pull/87

diff --git a/stdnum/ec/ci.py b/stdnum/ec/ci.py
index cb7a882..a9e8604 100644
--- a/stdnum/ec/ci.py
+++ b/stdnum/ec/ci.py
@@ -60,7 +60,7 @@ def validate(number):
         raise InvalidLength()
     if not number.isdigit():
         raise InvalidFormat()
-    if number[:2] < '01' or number[:2] > '24':
+    if (number[:2] < '01' or number[:2] > '24') and (number[:2] not in ('30', 
'50')):
         raise InvalidComponent()  # invalid province code
     if number[2] > '5':
         raise InvalidComponent()  # third digit wrong
diff --git a/stdnum/ec/ruc.py b/stdnum/ec/ruc.py
index 8a4b54a..b4b5fc5 100644
--- a/stdnum/ec/ruc.py
+++ b/stdnum/ec/ruc.py
@@ -60,7 +60,7 @@ def validate(number):
         raise InvalidLength()
     if not number.isdigit():
         raise InvalidFormat()
-    if number[:2] < '01' or number[:2] > '24':
+    if (number[:2] < '01' or number[:2] > '24') and (number[:2] not in ('30', 
'50')):
         raise InvalidComponent()  # invalid province code
     if number[2] < '6':
         # 0..5 = natural RUC: CI plus establishment number

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

Summary of changes:
 stdnum/ec/ci.py  | 2 +-
 stdnum/ec/ruc.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


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/