Skip to content

Commit

Permalink
Add video_connect_link field to User model (#1785)
Browse files Browse the repository at this point in the history
Add video_connect_link field to UserSerializer, UserAssignedSerializer, UserListSerializer, and User model
  • Loading branch information
Ashesh3 authored Jan 9, 2024
1 parent e01682f commit 2a85fc0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions care/users/api/serializers/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ class Meta:
"first_name",
"last_name",
"email",
"video_connect_link",
"user_type",
"doctor_qualification",
"doctor_experience_commenced_on",
Expand Down Expand Up @@ -377,6 +378,7 @@ class Meta:
"home_facility_object",
"doctor_qualification",
"doctor_experience_commenced_on",
"video_connect_link",
"doctor_medical_council_registration",
"skills",
)
Expand Down Expand Up @@ -413,4 +415,5 @@ class Meta:
"last_login",
"home_facility_object",
"home_facility",
"video_connect_link",
)
17 changes: 17 additions & 0 deletions care/users/migrations/0011_user_video_connect_link.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.6 on 2023-12-26 17:51

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("users", "0010_rename_skills"),
]

operations = [
migrations.AddField(
model_name="user",
name="video_connect_link",
field=models.URLField(blank=True, null=True),
),
]
1 change: 1 addition & 0 deletions care/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ class User(AbstractUser):
blank=True,
null=True,
)
video_connect_link = models.URLField(blank=True, null=True)

gender = models.IntegerField(choices=GENDER_CHOICES, blank=False)
age = models.IntegerField(validators=[MinValueValidator(1), MaxValueValidator(100)])
Expand Down
1 change: 1 addition & 0 deletions care/users/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def get_detail_representation(self, obj=None) -> dict:
"doctor_medical_council_registration": obj.doctor_medical_council_registration,
"doctor_qualification": obj.doctor_qualification,
"weekly_working_hours": obj.weekly_working_hours,
"video_connect_link": obj.video_connect_link,
**self.get_local_body_district_state_representation(obj),
}

Expand Down

0 comments on commit 2a85fc0

Please sign in to comment.