Skip to content

Commit

Permalink
Allow transfer for patients defaults to true if peacetime, else `…
Browse files Browse the repository at this point in the history
…false` (#1269)

* fixes coronasafe/care#5381

* Revert "fixes coronasafe/care#5381"

This reverts commit 0826c4d.

* set default via serializer based on PEACETIME
  • Loading branch information
rithviknishad authored Apr 28, 2023
1 parent 79618c8 commit b180288
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions care/facility/api/serializers/patient.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import datetime

from django.conf import settings
from django.db import transaction
from django.utils.timezone import localtime, make_aware, now
from rest_framework import serializers
Expand Down Expand Up @@ -213,6 +214,8 @@ class Meta:
queryset=User.objects.all(), required=False, allow_null=True
)

allow_transfer = serializers.BooleanField(default=settings.PEACETIME_MODE)

class Meta:
model = PatientRegistration
exclude = (
Expand Down

0 comments on commit b180288

Please sign in to comment.