Skip to content

Commit 954ddca

Browse files
committed
Fix issues in note creation
1 parent 38f432e commit 954ddca

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

care/emr/api/viewsets/notes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def get_patient(self):
4444
def authorize_create(self, instance):
4545
patient = self.get_patient()
4646
if instance.encounter:
47-
encounter = get_object_or_404(Encounter, instance.encounter)
47+
encounter = get_object_or_404(Encounter, external_id=instance.encounter)
4848
allowed = AuthorizationController.call(
4949
"can_update_encounter_obj", self.request.user, encounter
5050
)

config/api_router.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
AvailabilityExceptionsViewSet,
4646
)
4747
from care.emr.api.viewsets.scheduling.booking import TokenBookingViewSet
48-
from care.emr.api.viewsets.units import UnitsView
4948
from care.emr.api.viewsets.user import UserViewSet
5049
from care.emr.api.viewsets.valueset import ValueSetViewSet
5150
from care.facility.api.viewsets.facility import AllFacilityViewSet
@@ -78,7 +77,7 @@
7877

7978
router.register("batch_requests", BatchRequestView, basename="batch-requests")
8079

81-
router.register("units", UnitsView, basename="units")
80+
# router.register("units", UnitsView, basename="units")
8281

8382
router.register("valueset", ValueSetViewSet, basename="value-set")
8483

0 commit comments

Comments
 (0)