Skip to content

Commit

Permalink
add facility description
Browse files Browse the repository at this point in the history
  • Loading branch information
sainak committed Dec 22, 2024
1 parent 6324437 commit 73c8e6a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions care/facility/api/serializers/facility.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class Meta:
fields = (
"id",
"name",
"description",
"local_body",
"district",
"state",
Expand Down Expand Up @@ -113,6 +114,7 @@ class Meta:
fields = [
"id",
"name",
"description",
"ward",
"local_body",
"district",
Expand Down
18 changes: 18 additions & 0 deletions care/facility/migrations/0471_facility_description.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.1.3 on 2024-12-22 06:20

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('facility', '0470_alter_historicalpatientregistration_is_antenatal_and_more'),
]

operations = [
migrations.AddField(
model_name='facility',
name='description',
field=models.TextField(blank=True),
),
]
1 change: 1 addition & 0 deletions care/facility/models/facility.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def check_if_spoke_is_not_ancestor(base_id: int, spoke_id: int):

class Facility(FacilityBaseModel, FacilityPermissionMixin):
name = models.CharField(max_length=1000, blank=False, null=False)
description = models.TextField(blank=True, null=False)
is_active = models.BooleanField(default=True)
verified = models.BooleanField(default=False)
facility_type = models.IntegerField(choices=FACILITY_TYPES)
Expand Down

0 comments on commit 73c8e6a

Please sign in to comment.