summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorGabriel Muñumel <gabrielmunumel@gmail.com>2015-02-26 08:50:53 +0000
committerTim Graham <timograham@gmail.com>2015-02-26 11:00:52 -0500
commit0831a43c3afc3f93b8ed0c58630836e38248be12 (patch)
tree24982eafb652bc65dbbf6119d2c173296cfcc547 /django
parentaa6853da22ea6d2fb93d6b067bb073190d86f41a (diff)
[1.7.x] Fixed #24352 -- Fixed crash when coercing ``ManyRelatedManager`` to a string.
Diffstat (limited to 'django')
-rw-r--r--django/db/models/fields/related.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
index 344b238de8..c4cf4b79e5 100644
--- a/django/db/models/fields/related.py
+++ b/django/db/models/fields/related.py
@@ -855,6 +855,9 @@ def create_many_related_manager(superclass, rel):
)
do_not_call_in_templates = True
+ def __str__(self):
+ return repr(self)
+
def _build_remove_filters(self, removed_vals):
filters = Q(**{self.source_field_name: self.related_val})
# No need to add a subquery condition if removed_vals is a QuerySet without