Skip to content

Commit

Permalink
Merge pull request #1538 from coronasafe/master
Browse files Browse the repository at this point in the history
Production Release; Hotfix
  • Loading branch information
mathew-alex authored Aug 21, 2023
2 parents bd1fa0c + 134a5be commit f1f1850
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 20 deletions.
34 changes: 34 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose
{
"name": "Care",
"dockerComposeFile": [
"../docker-compose.yaml",
"../docker-compose.local.yaml"
],
"hostRequirements": {
"cpus": 4
},
"waitFor": "onCreateCommand",
"service": "backend",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"postCreateCommand": "python manage.py migrate && python manage.py collectstatic --noinput",
"postAttachCommand": {
"server": "python manage.py runserver"
},

"customizations": {
"vscode": {
"extensions": [
"ms-python.python"
]
}
},
"portsAttributes": {
"8000": {
"label": "Application",
"onAutoForward": "openPreview"
}
},
"forwardPorts": [9000]
}
1 change: 1 addition & 0 deletions .github/workflows/deployment-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- abdm
- abdm-m2
- hcx-communications
- fix-hcx
paths-ignore:
- "docs/**"

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ typings/
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.devcontainer/*

# Provided default Pycharm Run/Debug Configurations should be tracked by git
# In case of local modifications made by Pycharm, use update-index command
Expand Down
13 changes: 5 additions & 8 deletions care/facility/api/viewsets/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,12 @@ class AssetFilter(filters.FilterSet):
is_working = filters.BooleanFilter()
qr_code_id = filters.CharFilter(field_name="qr_code_id", lookup_expr="icontains")
in_use_by_consultation = filters.BooleanFilter(
method="filter_in_use_by_consultation"
method="filter_in_use_by_consultation",
distinct=True,
)
is_permanent = filters.BooleanFilter(method="filter_is_permanent")
is_permanent = filters.BooleanFilter(method="filter_is_permanent", distinct=True)

def filter_in_use_by_consultation(self, queryset, name, value):
if value is None:
return queryset
def filter_in_use_by_consultation(self, queryset, _, value):
if value:
return queryset.filter(assigned_consultation_beds__end_date__isnull=True)
else:
Expand All @@ -126,9 +125,7 @@ def filter_in_use_by_consultation(self, queryset, name, value):
| Q(assigned_consultation_beds__end_date__isnull=False)
)

def filter_is_permanent(self, queryset, name, value):
if value is None:
return queryset
def filter_is_permanent(self, queryset, _, value):
if value:
return queryset.filter(
asset_class__in=[
Expand Down
7 changes: 1 addition & 6 deletions care/hcx/utils/fhir.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,12 +1060,7 @@ def get_errors_from_coding(codings):
)

return {
"id": list(
filter(
lambda identifier: identifier.system == SYSTEM.claim_identifier,
claim_response.identifier,
)
)[0].value,
"id": claim_bundle.id,
"total_approved": reduce(
lambda price, acc: price + acc,
map(
Expand Down
2 changes: 1 addition & 1 deletion care/hcx/utils/hcx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def createHeaders(self, recipientCode=None, correlationId=None):
else str(uuid.uuid4()),
# "x-hcx-workflow_id": str(uuid.uuid4()),
"x-hcx-api_call_id": str(uuid.uuid4()),
"x-hcx-status": "response.complete",
# "x-hcx-status": "response.complete",
}
return hcx_headers

Expand Down
2 changes: 1 addition & 1 deletion care/users/api/viewsets/userskill.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class UserSkillViewSet(
def get_queryset(self):
username = self.kwargs["users_username"]
user = get_object_or_404(User, username=username)
return self.queryset.filter(user=user)
return self.queryset.filter(user=user).distinct()

def perform_create(self, serializer):
username = self.kwargs["users_username"]
Expand Down
4 changes: 1 addition & 3 deletions docker-compose.local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ version: '3.4'
services:
db:
env_file:
- ./.env
- ./docker/.local.env

backend:
build:
context: .
dockerfile: docker/DevDockerfile
env_file:
- ./docker/.local.env
- ./.env
volumes:
- .:/app

Expand All @@ -22,7 +21,6 @@ services:
dockerfile: docker/DevDockerfile
env_file:
- ./docker/.local.env
- ./.env
entrypoint: [ "bash", "celery_dev.sh" ]
depends_on:
- db
Expand Down

0 comments on commit f1f1850

Please sign in to comment.