Commit 0cc0b152 authored by Jonne Haß's avatar Jonne Haß

do not call .photo_count on a reshare etc.

parent e1edef9f
......@@ -36,7 +36,7 @@ class Post < ActiveRecord::Base
t.add :user_like
t.add :mentioned_people
t.add lambda { |post|
if post.photos_count > 0
if post.respond_to?(:photos) && post.photos_count > 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment