diff --git a/comments/views.py b/comments/views.py index 543d49c9f6b270ea32290c34dc40b3e7af302341..1f62b7f16ddd1cbdb6d3b3a3850423cf45d14f20 100644 --- a/comments/views.py +++ b/comments/views.py @@ -79,9 +79,10 @@ def vet_submitted_comment(request, comment_id): # Update `latest_activity` fields content_object = comment.content_object - content_object.__class__.objects.filter(id=content_object.id).update( - latest_activity=timezone.now()) - content_object.refresh_from_db() + if hasattr(content_object, 'latest_activity'): + content_object.__class__.objects.filter(id=content_object.id).update( + latest_activity=timezone.now()) + content_object.refresh_from_db() if isinstance(content_object, Submission): # Add events to Submission and send mail to author of the Submission