From cefa673d81f19ba78bd8637af38c20298fb8868e Mon Sep 17 00:00:00 2001 From: Alexander Burdeiny Date: Wed, 29 Jun 2016 13:02:01 +0300 Subject: [PATCH] fix --- settings/forms.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/settings/forms.py b/settings/forms.py index 8789a47c..ce5df82b 100644 --- a/settings/forms.py +++ b/settings/forms.py @@ -83,8 +83,7 @@ class MainPageThemes(forms.Form): attributes = {'exposition_themes': 'main_page_expo', 'conference_themes': 'main_page_conf'} for obj_list in attributes.keys(): for i, obj in enumerate(data[obj_list], 1): - setattr(obj, attributes[obj_list], i) - obj.save() + obj.__class__.objects.filter(pk=obj.pk).update(**{attributes[obj_list]: i}) class MainPageNews(forms.Form):