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

Add fdrs fetched date #2119

Merged
merged 1 commit into from
Apr 29, 2024
Merged

Add fdrs fetched date #2119

merged 1 commit into from
Apr 29, 2024

Conversation

k9845
Copy link
Contributor

@k9845 k9845 commented Apr 26, 2024

Addresses

Changes

  • Added field fdrs_data_fetched_year

NOTE: Please run the following command on staging server

docker-compose exec serve bash ./manage.py ingest_databank

Checklist

Things that should succeed before merging.

  • Updated/ran unit tests
  • Updated CHANGELOG.md

Release

If there is a version update, make sure to tag the repository with the latest version.

Comment on lines +538 to +542
fdrs_data_fetched_year = models.CharField(
verbose_name=_('FDRS Data Fetched Year'),
null=True, blank=True,
max_length=50
)
Copy link
Member

Choose a reason for hiding this comment

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

Any reason why we are storing year in string?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We get year as string from data source and populating that here.

Comment on lines 124 to 125
get_max_year = lambda data: max(int(item['year']) for item in fdrs_data.values())
fdrs_data_fetched_year = get_max_year(fdrs_data)
Copy link
Member

Choose a reason for hiding this comment

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

Any reason why we need lambda here instead of simple statement?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replaced with normal statement

@k9845 k9845 force-pushed the feature/fdrs_fetched_date branch from a732ae2 to 6da10f7 Compare April 26, 2024 09:29
@k9845 k9845 requested a review from thenav56 April 26, 2024 09:31
@samshara samshara merged commit be860cb into develop Apr 29, 2024
1 check passed
@samshara samshara deleted the feature/fdrs_fetched_date branch April 29, 2024 08:29
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.

3 participants