From eb7c358e1ef4408818c5b8e0c3751207c7b8cdc0 Mon Sep 17 00:00:00 2001 From: Shivank Kacker Date: Thu, 30 May 2024 13:04:50 +0530 Subject: [PATCH] fixing files --- care/facility/admin.py | 6 +++++- ...1_remove_patientconsultation_consent_records_and_more.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/care/facility/admin.py b/care/facility/admin.py index 3d474b167c..75d7c91aca 100644 --- a/care/facility/admin.py +++ b/care/facility/admin.py @@ -7,7 +7,10 @@ from care.facility.models.asset import Asset from care.facility.models.bed import AssetBed, Bed from care.facility.models.file_upload import FileUpload -from care.facility.models.patient_consultation import PatientConsent +from care.facility.models.patient_consultation import ( + PatientConsent, + PatientConsultation, +) from care.facility.models.patient_sample import PatientSample from care.facility.models.patient_tele_consultation import PatientTeleConsultation @@ -215,3 +218,4 @@ class FacilityUserAdmin(DjangoQLSearchMixin, admin.ModelAdmin, ExportCsvMixin): admin.site.register(Bed) admin.site.register(PatientConsent) admin.site.register(FileUpload) +admin.site.register(PatientConsultation) diff --git a/care/facility/migrations/0441_remove_patientconsultation_consent_records_and_more.py b/care/facility/migrations/0441_remove_patientconsultation_consent_records_and_more.py index 03b685153e..6cca0a333e 100644 --- a/care/facility/migrations/0441_remove_patientconsultation_consent_records_and_more.py +++ b/care/facility/migrations/0441_remove_patientconsultation_consent_records_and_more.py @@ -60,7 +60,7 @@ def migrate_consents(apps, schema_editor): files.update(**kwargs) - new_consent.files.set(files) + new_consent.files.add(*files) def reverse_migrate(apps, schema_editor): PatientConsent: PatientConsentModel = apps.get_model(