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:
Adrian Holovaty 2006-01-15 06:11:14 +00:00
parent 6e664fe071
commit 34c587e81e
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@
<!-- Content -->
<div id="content" class="{% block coltype %}colM{% 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 sidebar %}{% endblock %}
<br class="clear" />

View File

@ -413,7 +413,7 @@ class Model(object):
return getattr(self, cache_var)
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]), []
for current_id in current_ids:
if current_id in id_list: