minor fix

This commit is contained in:
wilsongomez 2022-08-03 11:58:00 -05:00
parent 4a7c74abb6
commit 2e96d58f7e
1 changed files with 4 additions and 2 deletions

View File

@ -137,11 +137,13 @@ def create_app(dbname):
@tryton.transaction()
def _method():
Party = _pool.get('party.party')
party, = Party.search_read([
party = Party.search_read([
('id_number', '=', idNumber),
], fields_names=['id', 'name', 'id_number', 'email']
)
return party
if not party:
return {'status': 'error', 'message': 'Tercero no encontrado'}
return party[0]
return send(exec_(_method))