From c8069e01cd7677adc9f04306d8a8fef2115057b2 Mon Sep 17 00:00:00 2001 From: Jason Kotenko Date: Wed, 27 Jul 2011 16:16:57 +0800 Subject: [PATCH] Changed post-save signal handler to not b0rk ./manage.py loaddata on projects which use tags --- tagging/fields.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tagging/fields.py b/tagging/fields.py index f4714676..6b2f2325 100644 --- a/tagging/fields.py +++ b/tagging/fields.py @@ -72,8 +72,9 @@ def _save(self, **kwargs): #signal, sender, instance): """ Save tags back to the database """ - tags = self._get_instance_tag_cache(kwargs['instance']) - Tag.objects.update_tags(kwargs['instance'], tags) + if not kwargs['raw'] + tags = self._get_instance_tag_cache(kwargs['instance']) + Tag.objects.update_tags(kwargs['instance'], tags) def _update(self, **kwargs): #signal, sender, instance): """