From 2484535214e36cea927ae1292d682cfd287ac391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Sun, 25 Jun 2017 12:18:47 +0200 Subject: [PATCH] remove old code --- src/c3nav/editor/models/changeset.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/c3nav/editor/models/changeset.py b/src/c3nav/editor/models/changeset.py index 5697127c..df5fe03a 100644 --- a/src/c3nav/editor/models/changeset.py +++ b/src/c3nav/editor/models/changeset.py @@ -379,16 +379,9 @@ class ChangeSet(models.Model): if isinstance(obj, ModelInstanceWrapper): obj = obj._obj model = type(obj) - field = model._meta.get_field('titles' if name.startswith('title_') else name) with transaction.atomic(): current_obj = get_current_obj(model, obj.pk) - current_value = get_field_value(current_obj, field) - try: - current_value = getattr(current_obj, field.attname) - except AttributeError: - current_value = field.to_prep_value(getattr(current_obj, field.name)) - if name.startswith('title_'): - current_value = current_value.get(name[6:], '') + current_value = get_field_value(current_obj, name) if current_value != value: change = self._add_value('update', obj, name, value, author)