agenda: don't store appoinment title into db
This commit is contained in:
parent
42d5f29558
commit
e90f4c7328
|
@ -94,6 +94,7 @@ class Appointment(object):
|
|||
if not service in services:
|
||||
validation_states = None
|
||||
self.validation = (event.act, state, display_name, validation_states)
|
||||
self.title = event.patient.display_name
|
||||
else:
|
||||
if event.event_type.label == 'Autre' and event.title:
|
||||
self.title = event.title
|
||||
|
|
|
@ -83,7 +83,6 @@ class NewAppointmentForm(BaseForm):
|
|||
appointment.end_datetime = appointment.start_datetime + timedelta(
|
||||
minutes=self.cleaned_data['duration'])
|
||||
appointment.creator = get_request().user
|
||||
appointment.title = appointment.patient.display_name
|
||||
appointment.clean()
|
||||
if commit:
|
||||
appointment.save()
|
||||
|
|
|
@ -39,7 +39,7 @@ class Event(models.Model):
|
|||
'''
|
||||
objects = managers.EventManager()
|
||||
|
||||
title = models.CharField(_('Title'), max_length=60, blank=True)
|
||||
title = models.CharField(_('Title'), max_length=60, blank=True, default="")
|
||||
description = models.TextField(_('Description'), max_length=100, blank=True, null=True)
|
||||
event_type = models.ForeignKey(EventType, verbose_name=u"Type d'événement")
|
||||
creator = models.ForeignKey(User, verbose_name=_(u'Créateur'), blank=True, null=True)
|
||||
|
|
Reference in New Issue