Skip to content

Commit

Permalink
remove duplicate files and merge migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
UdaySagar-Git committed Oct 2, 2024
1 parent abf0351 commit f526d94
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 148 deletions.
2 changes: 1 addition & 1 deletion care/facility/api/serializers/patient.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ class PatientNotesSerializer(serializers.ModelSerializer):
def get_mentioned_users(self, obj):
mentioned_users = set(re.findall(r"@(\w+)", obj.note))
users = User.objects.filter(username__in=mentioned_users)
return [UserBaseMinimumSerializer(user).data for user in users]
return UserBaseMinimumSerializer(users, many=True).data

def get_parent_note_object(self, obj):
parent_note = obj
Expand Down
25 changes: 0 additions & 25 deletions care/facility/migrations/0444_patientnotes_reply_to.py

This file was deleted.

32 changes: 0 additions & 32 deletions care/facility/migrations/0445_alter_fileupload_file_type.py

This file was deleted.

13 changes: 0 additions & 13 deletions care/facility/migrations/0446_merge_20240709_1859.py

This file was deleted.

13 changes: 0 additions & 13 deletions care/facility/migrations/0448_merge_20240821_0345.py

This file was deleted.

42 changes: 0 additions & 42 deletions care/facility/migrations/0449_alter_notification_event.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 5.1.1 on 2024-10-01 21:58

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('facility', '0465_merge_20240923_1045'),
]

operations = [
migrations.AlterField(
model_name='fileupload',
name='file_type',
field=models.IntegerField(choices=[(0, 'OTHER'), (1, 'PATIENT'), (2, 'CONSULTATION'), (3, 'SAMPLE_MANAGEMENT'), (4, 'CLAIM'), (5, 'DISCHARGE_SUMMARY'), (6, 'COMMUNICATION'), (7, 'CONSENT_RECORD'), (8, 'ABDM_HEALTH_INFORMATION'), (9, 'NOTES')], default=1),
),
migrations.AlterField(
model_name='notification',
name='event',
field=models.IntegerField(choices=[(0, 'MESSAGE'), (20, 'PATIENT_CREATED'), (30, 'PATIENT_UPDATED'), (40, 'PATIENT_DELETED'), (50, 'PATIENT_CONSULTATION_CREATED'), (60, 'PATIENT_CONSULTATION_UPDATED'), (70, 'PATIENT_CONSULTATION_DELETED'), (80, 'INVESTIGATION_SESSION_CREATED'), (90, 'INVESTIGATION_UPDATED'), (100, 'PATIENT_FILE_UPLOAD_CREATED'), (110, 'CONSULTATION_FILE_UPLOAD_CREATED'), (120, 'PATIENT_CONSULTATION_UPDATE_CREATED'), (130, 'PATIENT_CONSULTATION_UPDATE_UPDATED'), (140, 'PATIENT_CONSULTATION_ASSIGNMENT'), (200, 'SHIFTING_UPDATED'), (210, 'PATIENT_NOTE_ADDED'), (220, 'PUSH_MESSAGE'), (230, 'PATIENT_PRESCRIPTION_CREATED'), (240, 'PATIENT_PRESCRIPTION_UPDATED'), (250, 'PATIENT_NOTE_MENTIONED')], default=0),
),
]
2 changes: 0 additions & 2 deletions care/users/api/serializers/user.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import boto3
from django.contrib.auth.hashers import make_password
from django.db import transaction
from django.utils.timezone import now
Expand All @@ -13,7 +12,6 @@
)
from care.users.api.serializers.skill import UserSkillSerializer
from care.users.models import GENDER_CHOICES, User
from care.utils.csp.config import BucketType, get_client_config
from care.utils.file_uploads.cover_image import upload_cover_image
from care.utils.models.validators import (
cover_image_validator,
Expand Down
1 change: 0 additions & 1 deletion care/users/api/viewsets/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ def check_availability(self, request, username):
return Response(status=status.HTTP_409_CONFLICT)
return Response(status=status.HTTP_200_OK)


def has_profile_image_write_permission(self, request, user):
return request.user.is_superuser or (user.id == request.user.id)

Expand Down
18 changes: 0 additions & 18 deletions care/users/migrations/0017_user_profile_picture_url.py

This file was deleted.

1 change: 0 additions & 1 deletion care/users/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def get_detail_representation(self, obj=None) -> dict:
"qualification": obj.qualification,
"weekly_working_hours": obj.weekly_working_hours,
"video_connect_link": obj.video_connect_link,
"profile_picture_url": obj.profile_picture_url,
"read_profile_picture_url": obj.profile_picture_url,
"user_flags": [],
**self.get_local_body_district_state_representation(obj),
Expand Down

0 comments on commit f526d94

Please sign in to comment.