this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Deployment fixes

+35 -14
+2
.dockerignore
··· 4 4 staticfiles 5 5 .coverage 6 6 care/media/ 7 + celerybeat-schedule 8 + celerybeat*
+8 -7
care/emr/api/otp_viewsets/login.py
··· 8 8 from rest_framework.response import Response 9 9 10 10 from care.emr.api.viewsets.base import EMRBaseViewSet 11 + from care.facility.api.serializers.patient_otp import rand_pass 11 12 from care.facility.models import PatientMobileOTP 12 13 from care.utils.models.validators import mobile_validator 13 14 from care.utils.sms.send_sms import send_sms ··· 46 47 ) 47 48 if sent_otps.count() >= settings.OTP_MAX_REPEATS_WINDOW: 48 49 raise ValidationError({"phone_number": "Max Retries has exceeded"}) 49 - random_otp = "45612" # rand_pass(settings.OTP_LENGTH) 50 - otp_obj = PatientMobileOTP(phone_number=data.phone_number, otp=random_otp) 50 + random_otp = "" 51 51 if settings.USE_SMS: 52 + random_otp = rand_pass(settings.OTP_LENGTH) 52 53 try: 53 54 send_sms( 54 - otp_obj.phone_number, 55 + data.phone_number, 55 56 ( 56 - f"Open Healthcare Network Patient Management System Login, OTP is {otp_obj.otp} . " 57 + f"Open Healthcare Network Patient Management System Login, OTP is {random_otp} . " 57 58 "Please do not share this Confidential Login Token with anyone else" 58 59 ), 59 60 ) ··· 61 62 import logging 62 63 63 64 logging.error(e) 64 - elif settings.DEBUG: 65 - import logging 65 + else: 66 + random_otp = "45612" 66 67 67 - logging.info(f"{otp_obj.otp} {otp_obj.phone_number}") # noqa G004 68 + otp_obj = PatientMobileOTP(phone_number=data.phone_number, otp=random_otp) 68 69 otp_obj.save() 69 70 return Response({"otp": "generated"}) 70 71
+1 -1
care/emr/migrations/0017_alter_questionnaire_slug.py
··· 18 18 ] 19 19 20 20 operations = [ 21 - migrations.RunPython(gen_uuid), 21 + migrations.RunPython(gen_uuid , reverse_code=migrations.RunPython.noop), 22 22 migrations.AlterField( 23 23 model_name='questionnaire', 24 24 name='slug',
+18
care/emr/migrations/0060_alter_medicationrequest_dosage_instruction.py
··· 1 + # Generated by Django 5.1.3 on 2024-12-30 18:11 2 + 3 + from django.db import migrations, models 4 + 5 + 6 + class Migration(migrations.Migration): 7 + 8 + dependencies = [ 9 + ('emr', '0059_alter_medicationrequest_dosage_instruction_and_more'), 10 + ] 11 + 12 + operations = [ 13 + migrations.AlterField( 14 + model_name='medicationrequest', 15 + name='dosage_instruction', 16 + field=models.JSONField(blank=True, default=dict, null=True), 17 + ), 18 + ]
+2 -2
config/settings/production.py
··· 5 5 ) 6 6 7 7 IS_PRODUCTION = True 8 - USE_SMS = True 9 - SEND_SMS_NOTIFICATION = True 8 + USE_SMS = env.bool("USE_SMS", default=True) # noqa F405 9 + SEND_SMS_NOTIFICATION = False
+1 -1
config/settings/staging.py
··· 5 5 # Your stuff... 6 6 # ------------------------------------------------------------------------------ 7 7 8 - USE_SMS = True 8 + USE_SMS = env.bool("USE_SMS", default=True) # noqa F405
+1 -1
scripts/celery_beat.sh
··· 8 8 fi 9 9 10 10 if [ -z "${REDIS_URL}" ]; then 11 - export REDIS_URL="rediss://:${REDIS_AUTH_TOKEN}@${REDIS_HOST}:${REDIS_PORT}/${REDIS_DATABASE}?ssl_cert_reqs=CERT_OPTIONAL" 11 + export REDIS_URL="rediss://:${REDIS_AUTH_TOKEN}@${REDIS_HOST}:${REDIS_PORT}/${REDIS_DATABASE}?ssl_cert_reqs=none" 12 12 fi 13 13 14 14
+1 -1
scripts/celery_worker.sh
··· 8 8 fi 9 9 10 10 if [ -z "${REDIS_URL}" ]; then 11 - export REDIS_URL="rediss://:${REDIS_AUTH_TOKEN}@${REDIS_HOST}:${REDIS_PORT}/${REDIS_DATABASE}?ssl_cert_reqs=CERT_OPTIONAL" 11 + export REDIS_URL="rediss://:${REDIS_AUTH_TOKEN}@${REDIS_HOST}:${REDIS_PORT}/${REDIS_DATABASE}?ssl_cert_reqs=none" 12 12 fi 13 13 14 14
+1 -1
scripts/start.sh
··· 8 8 fi 9 9 10 10 if [ -z "${REDIS_URL}" ]; then 11 - export REDIS_URL="rediss://:${REDIS_AUTH_TOKEN}@${REDIS_HOST}:${REDIS_PORT}/${REDIS_DATABASE}?ssl_cert_reqs=CERT_OPTIONAL" 11 + export REDIS_URL="rediss://:${REDIS_AUTH_TOKEN}@${REDIS_HOST}:${REDIS_PORT}/${REDIS_DATABASE}?ssl_cert_reqs=none" 12 12 fi 13 13 14 14