Skip to content
Snippets Groups Projects

fixed problem with unicode characters in names when checking office availability for daily planning

Merged Carlos Vega requested to merge hotfix/unicode_error_office_availability into master
2 files
+ 5
2
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -185,7 +185,7 @@ class Worker(models.Model):
@@ -185,7 +185,7 @@ class Worker(models.Model):
start_date = start_date.replace(hour=0, minute=0, second=0)
start_date = start_date.replace(hour=0, minute=0, second=0)
end_date = start_date + datetime.timedelta(days=1)
end_date = start_date + datetime.timedelta(days=1)
office_availability = OfficeAvailability('{} {}'.format(self.first_name, self.last_name), start=start_date, end=end_date)
office_availability = OfficeAvailability(u'{} {}'.format(self.first_name, self.last_name), start=start_date, end=end_date)
#Appointments
#Appointments
subject_appointments = AppointmentTypeLink.objects.filter(worker=self.id, date_when__gte=start_date, date_when__lte=end_date)
subject_appointments = AppointmentTypeLink.objects.filter(worker=self.id, date_when__gte=start_date, date_when__lte=end_date)
Loading