Skip to content

Commit

Permalink
Merge pull request #590 from idmc-labs/fix/swagger-issues
Browse files Browse the repository at this point in the history
Update the label for displacement_ocurred
  • Loading branch information
Rup-Narayan-Rajbanshi committed Apr 9, 2024
2 parents bb0ece2 + 6ec3ad3 commit 4daadf0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/entry/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ def get_idu_data(filters=None):
),
),
displacement_occurred_transformed=Case(
When(displacement_occurred=0, then=Value("Displacement due to preventive evacuation")),
When(displacement_occurred__in=[1, 2, 3], then=Value("Displacement without preventive evacuation")),
When(displacement_occurred=0, then=Value("Displacement due to preventive evacuation reported")),
When(displacement_occurred__in=[1, 2, 3], then=Value("Displacement without preventive evacuation reported")),
output_field=CharField()
),
custom_figure_text=Case(
Expand Down
2 changes: 2 additions & 0 deletions apps/gidd/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def export(self, request):
response = HttpResponse(content=save_virtual_workbook(wb))
filename = 'IDMC_GIDD_Disasters_Internal_Displacement_Data.xlsx'
response['Content-Disposition'] = f'attachment; filename={filename}'
response['Content-Type'] = 'application/octet-stream'
return response


Expand Down Expand Up @@ -577,6 +578,7 @@ def export(self, request):
response = HttpResponse(content=save_virtual_workbook(wb))
filename = 'IDMC_Internal_Displacement_Conflict-Violence_Disasters.xlsx'
response['Content-Disposition'] = f'attachment; filename={filename}'
response['Content-Type'] = 'application/octet-stream'
return response


Expand Down
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ services:
context: ./
dockerfile: worker.Dockerfile
command: python manage.py run_celery_dev
# Fix 100% CPU usage on archlinux (https://github.com/goauthentik/authentik/pull/7762)
ulimits:
nofile:
soft: 10240
hard: 10240

volumes:
helix-db-13-data:
Expand Down
1 change: 1 addition & 0 deletions helix/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@
'CONTACT': {'email': 'info@idmc.ch'},
"SWAGGER_UI_SETTINGS": {
"deepLinking": True,
"syntaxHighlight": False, # Disabling syntax highlighting as it takes considerable time to load
"persistAuthorization": True,
"displayOperationId": True,
},
Expand Down

0 comments on commit 4daadf0

Please sign in to comment.