magic-removal: Merged to [1976]
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1977 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
6e664fe071
commit
34c587e81e
|
@ -36,7 +36,7 @@
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<div id="content" class="{% block coltype %}colM{% endblock %}">
|
<div id="content" class="{% block coltype %}colM{% endblock %}">
|
||||||
{% block pretitle %}{% endblock %}
|
{% block pretitle %}{% endblock %}
|
||||||
{% if title %}<h1>{{ title }}</h1>{% endif %}
|
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
|
||||||
{% block content %}{{ content }}{% endblock %}
|
{% block content %}{{ content }}{% endblock %}
|
||||||
{% block sidebar %}{% endblock %}
|
{% block sidebar %}{% endblock %}
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
|
|
|
@ -413,7 +413,7 @@ class Model(object):
|
||||||
return getattr(self, cache_var)
|
return getattr(self, cache_var)
|
||||||
|
|
||||||
def _set_many_to_many_objects(self, id_list, field_with_rel):
|
def _set_many_to_many_objects(self, id_list, field_with_rel):
|
||||||
current_ids = [obj.id for obj in self._get_many_to_many_objects(field_with_rel)]
|
current_ids = [getattr(obj, obj._meta.pk.attname) for obj in self._get_many_to_many_objects(field_with_rel)]
|
||||||
ids_to_add, ids_to_delete = dict([(i, 1) for i in id_list]), []
|
ids_to_add, ids_to_delete = dict([(i, 1) for i in id_list]), []
|
||||||
for current_id in current_ids:
|
for current_id in current_ids:
|
||||||
if current_id in id_list:
|
if current_id in id_list:
|
||||||
|
|
Loading…
Reference in New Issue