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

Staging issue fixes #2079

Merged
merged 9 commits into from
Apr 4, 2024
Merged

Staging issue fixes #2079

merged 9 commits into from
Apr 4, 2024

Conversation

k9845
Copy link
Contributor

@k9845 k9845 commented Mar 25, 2024

Addresses

Changes

  • Changed email field from char to array
  • Update description for percomponent 34 and 14 to None
  • Added local units health assessment data
  • Added per in document upload

NOTES:

Please run the following command

docker-compose exec serve ./manage.py ingest_ns_contact
docker-compose exec serve ./manage.py import_local_units_health "Health Services Mapping Table A.csv"
docker-compose exec serve ./manage.py loaddata fdrs_indicator.json
docker-compose exec serve ./manage.py FDRS_INCOME

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.

@k9845 k9845 force-pushed the fix/staging-issue branch from 5eae062 to 70231e1 Compare March 27, 2024 09:27
@k9845 k9845 changed the title Set description null in required FormComponent Staging issue fixes Mar 29, 2024
@k9845 k9845 marked this pull request as ready for review March 29, 2024 04:21
@k9845 k9845 force-pushed the fix/staging-issue branch from 70231e1 to 0fc8526 Compare March 29, 2024 04:24
@k9845 k9845 requested a review from thenav56 March 29, 2024 04:28
@k9845 k9845 force-pushed the fix/staging-issue branch 2 times, most recently from d471a21 to 5825bc6 Compare April 2, 2024 07:48
@k9845 k9845 force-pushed the fix/staging-issue branch from 5825bc6 to bf02975 Compare April 2, 2024 07:58
Copy link
Member

@susilnem susilnem left a comment

Choose a reason for hiding this comment

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

LGTM

@k9845 k9845 force-pushed the fix/staging-issue branch from 4f78423 to f43d215 Compare April 2, 2024 10:48
Copy link
Member

@thenav56 thenav56 left a comment

Choose a reason for hiding this comment

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

Looks good.

api/management/commands/ingest_ns_contact.py Outdated Show resolved Hide resolved
api/management/commands/ingest_ns_contact.py Outdated Show resolved Hide resolved
api/models.py Outdated Show resolved Hide resolved
databank/management/commands/FDRS_INCOME.py Outdated Show resolved Hide resolved
databank/models.py Outdated Show resolved Hide resolved
per/drf_views.py Outdated
Comment on lines 378 to 379
if assessment_queryset.exists():
for assessent in assessment_queryset.first().area_responses.all():
Copy link
Member

@thenav56 thenav56 Apr 2, 2024

Choose a reason for hiding this comment

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

Suggested change
if assessment_queryset.exists():
for assessent in assessment_queryset.first().area_responses.all():
if assessent := assessment_queryset.first():
for area_response in assessent.area_responses.all():

Let's use Prefetch for all nested items here, we can use filters as well
https://docs.djangoproject.com/en/3.2/ref/models/querysets/#prefetch-related

>>> vegetarian_pizzas = Pizza.objects.filter(vegetarian=True)
>>> Restaurant.objects.prefetch_related(
...     Prefetch("pizzas", queryset=vegetarian_pizzas, to_attr="vegetarian_menu"),
...     "vegetarian_menu__toppings",
... )
>>> [menu for menu in restaurant_obj.vegetarian_menu] # No database fetching is done here

per/serializers.py Outdated Show resolved Hide resolved
per/serializers.py Outdated Show resolved Hide resolved
@samshara samshara requested review from thenav56 and susilnem April 3, 2024 08:58
databank/models.py Show resolved Hide resolved
api/models.py Outdated Show resolved Hide resolved
databank/management/commands/FDRS_INCOME.py Outdated Show resolved Hide resolved
local_units/management/commands/import-local-units-csv.py Outdated Show resolved Hide resolved
local_units/management/commands/import-local-units-csv.py Outdated Show resolved Hide resolved
local_units/management/commands/import-local-units-csv.py Outdated Show resolved Hide resolved
local_units/management/commands/import-local-units-csv.py Outdated Show resolved Hide resolved
@k9845 k9845 force-pushed the fix/staging-issue branch 3 times, most recently from 8fca044 to 6fe1a51 Compare April 4, 2024 06:14
@samshara samshara requested a review from thenav56 April 4, 2024 06:36
@k9845 k9845 force-pushed the fix/staging-issue branch from 6fe1a51 to 5b96762 Compare April 4, 2024 10:52
@thenav56 thenav56 merged commit ec8d589 into develop Apr 4, 2024
1 check passed
@thenav56 thenav56 deleted the fix/staging-issue branch April 4, 2024 11:53
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