-
Notifications
You must be signed in to change notification settings - Fork 1.2k
OS-2 : Week - 4 : Prescription in appointment history and emergency contact number in doctor's schedule #1077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve @akshatnema
@divyanshkhetan Kindly push the migrations of this PR as there is a change in models.py. Review required from @PranshuNayak and @samay-rgb. |
@divyanshkhetan Also, resolve the merge conflicts in the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Push the migrations for the changes too.
doctor_phone = models.CharField(max_length=10) | ||
specialization = models.CharField(max_length=100) | ||
active = models.BooleanField(default=True) | ||
contact_no = models.IntegerField(default=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use a Charfield instead and keep a max_length and min_length 10
@PranshuNayak @samay-rgb please take a look. |
doctor_phone = models.CharField(max_length=10) | ||
specialization = models.CharField(max_length=100) | ||
active = models.BooleanField(default=True) | ||
contact_no = models.CharField(max_length=10, validators=[MinLengthValidator(10)], default=0000000000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default must be a string for a CharField. Use min_length=10 instead of the validator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PranshuNayak
That is used for forms.CharField() and not for models.CharField(). That is why I used a validator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to change the default , it must be string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samay-rgb PTAL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Migration file should be updated too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@divyanshkhetan push new migrations, since you have changed the default value for contact_no
@PranshuNayak done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akshatnema changes in models.py are fine.
Proposed changes
Types of changes
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that applyScreenshots'