merging changes

This commit is contained in:
rolux 2011-10-11 09:18:25 +00:00
commit 654a967311
2 changed files with 3 additions and 1 deletions

View file

@ -29,7 +29,7 @@ class Event(models.Model):
user = models.ForeignKey(User, null=True, related_name='events') user = models.ForeignKey(User, null=True, related_name='events')
name = models.CharField(null=True, max_length=255, unique=True) name = models.CharField(null=True, max_length=255, unique=True)
name_sort = models.CharField(null=True, max_length=255, unique=True) name_sort = models.CharField(null=True, max_length=255, db_index=True)
name_find = models.TextField(default='', editable=True) name_find = models.TextField(default='', editable=True)
wikipediaId = models.CharField(max_length=1000, blank=True) wikipediaId = models.CharField(max_length=1000, blank=True)

View file

@ -76,6 +76,8 @@ def editEvent(request):
conflict = True conflict = True
conflict_names.append(name) conflict_names.append(name)
if not conflict: if not conflict:
if 'name' in data and event.name_sort == unicodedata.normalize('NFKD', event.name):
event.name_sort = unicodedata.normalize('NFKD', data['name'])
for key in ('name', 'start', 'startTime', 'end', 'endTime', 'duration', 'durationTime', for key in ('name', 'start', 'startTime', 'end', 'endTime', 'duration', 'durationTime',
'type', 'alternativeNames'): 'type', 'alternativeNames'):
if key in data: if key in data: