diff --git a/msystems/client/mconnect.py b/msystems/client/mconnect.py index aabeb74..c966897 100644 --- a/msystems/client/mconnect.py +++ b/msystems/client/mconnect.py @@ -16,8 +16,8 @@ def __init__(self): MsystemsConfig.mconnect_config['service_certificate'], MsystemsConfig.mconnect_config['mconnect_certificate'])]) - def get_person(self, idpn): + def get_person(self, idnp): service_handle = self.client.service['GetPerson'] if not service_handle: raise SoapClientError("Service GetPerson not found") - return service_handle(IDPN=idpn) + return service_handle(IDNP=idnp) diff --git a/msystems/migrations/0007_add_languages.py b/msystems/migrations/0007_add_languages.py new file mode 100644 index 0000000..98e1cb3 --- /dev/null +++ b/msystems/migrations/0007_add_languages.py @@ -0,0 +1,21 @@ +from django.db import migrations + +language_code_ro = "ro" +language_code_ru = "ru" + +def on_migration(apps, schema_editor): + language_model = apps.get_model("core", "language") + if not language_model.objects.filter(code=language_code_ro).exists(): + language_model(code=language_code_ro, name="Română").save() + if not language_model.objects.filter(code=language_code_ru).exists(): + language_model(code=language_code_ru, name="Русский").save() + +class Migration(migrations.Migration): + dependencies = [ + ('msystems', '0006_add_bill_query_rights'), + ('core', '0001_initial'), + ] + + operations = [ + migrations.RunPython(on_migration, migrations.RunPython.noop), + ] \ No newline at end of file