diff --git a/etc/migracao/migra.py b/etc/migracao/migra.py index 502aef2..8ffed80 100755 --- a/etc/migracao/migra.py +++ b/etc/migracao/migra.py @@ -210,6 +210,9 @@ def migra_cnpj(filename): except CasaLegislativa.DoesNotExist: print ERROR_MSG_1 % (filename, linenum) continue + except CasaLegislativa.MultipleObjectsReturned: + print ERROR_MSG_1 % (filename, linenum) + continue except ValueError: print ERROR_MSG_1 % (filename, linenum) continue @@ -274,6 +277,6 @@ if __name__ == '__main__': print "" migra_casas('casas.csv') print "" - migra_cnpj('cnpj.csv', 'casas.csv') + migra_cnpj('cnpj.csv') print "" migra_convenios('casas.csv')