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

Update fields data type #2139

Merged
merged 3 commits into from
May 10, 2024
Merged

Update fields data type #2139

merged 3 commits into from
May 10, 2024

Conversation

k9845
Copy link
Contributor

@k9845 k9845 commented May 9, 2024

Addresses

Changes

  • CharField replaced with TextField where ever possible

Checklist

File link

https://drive.google.com/file/d/1U--YPbumMN-OUZPKbYwiH5y-p6Qu4uPz/view?usp=drive_link
https://drive.google.com/file/d/1sNZc0F5So1NSWWGT5eWc9sgDKJoc9yGX/view?usp=drive_link
docker-compose exec serve bash ./manage.py import_health_data "Health-Data-TableB-08052024.csv"
docker-compose exec serve bash ./manage.py import_local_units_health "Health-Data-TableA-08052024.csv"
  • 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 feature/local-unit-data-update branch from 61de511 to 04f3789 Compare May 9, 2024 07:53
Copy link
Contributor

@szabozoltan69 szabozoltan69 left a comment

Choose a reason for hiding this comment

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

Good idea to remove character limit.

@k9845 k9845 force-pushed the feature/local-unit-data-update branch from 04f3789 to 1e82e6f Compare May 9, 2024 08:26
@k9845 k9845 force-pushed the feature/local-unit-data-update branch from b5d6520 to cf5c16f Compare May 9, 2024 08:39
@samshara samshara requested a review from thenav56 May 9, 2024 11:23
Copy link
Member

@samshara samshara left a comment

Choose a reason for hiding this comment

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

Let's optimize this on next PR

Comment on lines +11 to +18
country_admin_ids = [
codename.replace('country_admin_', '')
for codename in Permission.objects.filter(
group__user=user,
codename__startswith='country_admin_',
).values_list('codename', flat=True)
]
if user.is_superuser or object.country_id in country_admin_ids:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
country_admin_ids = [
codename.replace('country_admin_', '')
for codename in Permission.objects.filter(
group__user=user,
codename__startswith='country_admin_',
).values_list('codename', flat=True)
]
if user.is_superuser or object.country_id in country_admin_ids:
if user.is_superuser:
return True
country_admin_ids = [
codename.replace('country_admin_', '')
for codename in Permission.objects.filter(
group__user=user,
codename__startswith='country_admin_',
).values_list('codename', flat=True)
]
if object.country_id in country_admin_ids:

@samshara samshara merged commit e9a71fb into develop May 10, 2024
1 check passed
@szabozoltan69 szabozoltan69 deleted the feature/local-unit-data-update branch May 10, 2024 09:49
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.

4 participants