Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix optional fields of CorporateActionAnnouncement model #426

Merged
merged 4 commits into from
Mar 26, 2024

Conversation

hiohiohio
Copy link
Contributor

Context:

  • ValidationError for get_corporate_announcements
  • CorporateActionAnnouncement should allow empty for optional fields. this causes below errors
ValidationError: 10 validation errors for list[CorporateActionAnnouncement]
1179.ex_date
  Field required [type=missing, input_value={'id': 'e2df04c2-c7af-4c1..., 'new_rate': '1.00015'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
2130.target_symbol
  Field required [type=missing, input_value={'id': '8c8be13d-213d-409...', 'new_rate': '1.0175'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing
2130.target_original_cusip
  Field required [type=missing, input_value={'id': '8c8be13d-213d-409...', 'new_rate': '1.0175'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing

Changes:

  • set default value as None for optional fields of CorporateActionAnnouncement

Copy link
Contributor

@gnvk gnvk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hiohiohio hiohiohio merged commit c1e90f7 into master Mar 26, 2024
12 checks passed
@hiohiohio hiohiohio deleted the fix-corporate-action-announcement branch March 26, 2024 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants