-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add fdrs fetched date #2119
Conversation
fdrs_data_fetched_year = models.CharField( | ||
verbose_name=_('FDRS Data Fetched Year'), | ||
null=True, blank=True, | ||
max_length=50 | ||
) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
get_max_year = lambda data: max(int(item['year']) for item in fdrs_data.values()) | ||
fdrs_data_fetched_year = get_max_year(fdrs_data) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced with normal statement
a732ae2
to
6da10f7
Compare
Addresses
Changes
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.
Release
If there is a version update, make sure to tag the repository with the latest version.