fix overwriting of tags in the record function

This commit is contained in:
Benjamin Dauvergne 2014-01-30 17:17:20 +01:00
parent e292e19c0c
commit 9e5353317e
1 changed files with 2 additions and 2 deletions

View File

@ -52,10 +52,10 @@ def record(tag, template, using=None, **kwargs):
pass # we tried, really, we tried
journal = Journal.objects.using(using).create(tag=tag, template=template,
message=unicode_truncate(message, 128))
for tag, value in kwargs.iteritems():
for name, value in kwargs.iteritems():
if value is None:
continue
tag = Tag.objects.using(using).get_cached(name=tag)
tag = Tag.objects.using(using).get_cached(name=name)
if isinstance(value, django.db.models.Model):
journal.objectdata_set.create(tag=tag, content_object=value)
else: