@@ -391,7 +391,7 @@ def flag(request, comment_id, next=None):
391
391
get_comment_model (), pk = comment_id ,
392
392
site__pk = get_current_site_id (request ))
393
393
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
395
395
raise Http404 ("Comments posted to instances of '%s.%s' are not "
396
396
"explicitly allowed to receive 'removal suggestion' "
397
397
"flags. Check the COMMENTS_XTD_APP_MODEL_OPTIONS "
@@ -423,7 +423,7 @@ def like(request, comment_id, next=None):
423
423
comment = get_object_or_404 (get_comment_model (), pk = comment_id ,
424
424
site__pk = get_current_site_id (request ))
425
425
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
427
427
raise Http404 ("Comments posted to instances of '%s.%s' are not "
428
428
"explicitly allowed to receive 'liked it' flags. "
429
429
"Check the COMMENTS_XTD_APP_MODEL_OPTIONS "
@@ -459,7 +459,7 @@ def dislike(request, comment_id, next=None):
459
459
comment = get_object_or_404 (get_comment_model (), pk = comment_id ,
460
460
site__pk = get_current_site_id (request ))
461
461
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
463
463
raise Http404 ("Comments posted to instances of '%s.%s' are not "
464
464
"explicitly allowed to receive 'disliked it' flags. "
465
465
"Check the COMMENTS_XTD_APP_MODEL_OPTIONS "
0 commit comments