Fixed full_company_report method

This commit is contained in:
2025-12-25 14:23:39 +03:00
parent 18545789ba
commit 97cc810363
6 changed files with 25 additions and 18 deletions

View File

@@ -217,14 +217,18 @@ class FocusCompliance(Request):
model_id = [d['risk_model_id'] for d in self.check_models if d['name'] == 'corporate'][0]
response = self.get(f'{self._focus_base_url}/models/{model_id}/fullCompanyReport')
result = self._save_file(
filename='Полный_отчет',
content=response.content,
file_type='docx',
path=path
)
return {'success': True, 'file': result}
try:
result = self._save_file(
filename='Полный_отчет',
content=response.content,
file_type='docx',
path=path
)
return {'success': True, 'file': result}
except AttributeError:
return {'success': False, 'result': 'Организация не найдена'}
# Физлица
def person_is_foreign_agent(self):