mirror of
https://github.com/django/django.git
synced 2025-07-05 10:19:20 +00:00
[soc2009/multidb] Added partial handling for comments to be multi-db compliant. Patch from Russell Keith-Magee.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11892 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
44f21f2374
commit
562c5ffb07
@ -146,7 +146,9 @@ class CommentDetailsForm(CommentSecurityForm):
|
||||
Check that a submitted comment isn't a duplicate. This might be caused
|
||||
by someone posting a comment twice. If it is a dup, silently return the *previous* comment.
|
||||
"""
|
||||
possible_duplicates = self.get_comment_model()._default_manager.filter(
|
||||
possible_duplicates = self.get_comment_model()._default_manager.using(
|
||||
self.target_object._state.db
|
||||
).filter(
|
||||
content_type = new.content_type,
|
||||
object_pk = new.object_pk,
|
||||
user_name = new.user_name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user