@@ -391,7 +391,7 @@ def flag(request, comment_id, next=None):
391391 get_comment_model (), pk = comment_id ,
392392 site__pk = get_current_site_id (request ))
393393 if not get_app_model_options (comment = comment )['allow_flagging' ]:
394- ctype = ContentType . objects . get_for_model ( comment .content_object )
394+ ctype = comment .content_type
395395 raise Http404 ("Comments posted to instances of '%s.%s' are not "
396396 "explicitly allowed to receive 'removal suggestion' "
397397 "flags. Check the COMMENTS_XTD_APP_MODEL_OPTIONS "
@@ -423,7 +423,7 @@ def like(request, comment_id, next=None):
423423 comment = get_object_or_404 (get_comment_model (), pk = comment_id ,
424424 site__pk = get_current_site_id (request ))
425425 if not get_app_model_options (comment = comment )['allow_feedback' ]:
426- ctype = ContentType . objects . get_for_model ( comment .content_object )
426+ ctype = comment .content_type
427427 raise Http404 ("Comments posted to instances of '%s.%s' are not "
428428 "explicitly allowed to receive 'liked it' flags. "
429429 "Check the COMMENTS_XTD_APP_MODEL_OPTIONS "
@@ -459,7 +459,7 @@ def dislike(request, comment_id, next=None):
459459 comment = get_object_or_404 (get_comment_model (), pk = comment_id ,
460460 site__pk = get_current_site_id (request ))
461461 if not get_app_model_options (comment = comment )['allow_feedback' ]:
462- ctype = ContentType . objects . get_for_model ( comment .content_object )
462+ ctype = comment .content_type
463463 raise Http404 ("Comments posted to instances of '%s.%s' are not "
464464 "explicitly allowed to receive 'disliked it' flags. "
465465 "Check the COMMENTS_XTD_APP_MODEL_OPTIONS "
0 commit comments