feat: add reschedule appointment method to AppointmentRequest model #74

Merged
Saani merged 1 commits from feature/meetings into main 2025-12-05 18:44:30 +00:00

View File

@ -651,6 +651,18 @@ class AppointmentRequest(models.Model):
if commit:
self.save()
def reschedule_appointment(self, new_datetime, new_duration, commit=True):
self.status = 'scheduled'
self.scheduled_datetime = new_datetime
self.scheduled_duration = new_duration
self.rejection_reason = ''
if self.has_jitsi_meeting:
self.create_jitsi_meeting(with_moderation=True)
if commit:
self.save()
def reject_appointment(self, reason='', commit=True):
self.status = 'rejected'
self.rejection_reason = reason