mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.7.x] Fixed #24352 -- Fixed crash when coercing `ManyRelatedManager` to a string.
This commit is contained in:
committed by
Tim Graham
parent
aa6853da22
commit
0831a43c3a
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user