From af14fa76a14b415b696476b3086a01fd01f4efb1 Mon Sep 17 00:00:00 2001
From: MrZYX <pr0fkill@gmail.com>
Date: Sun, 20 Feb 2011 13:00:30 +0100
Subject: [PATCH] fixed #881

---
 app/views/people/_profile_sidebar.html.haml | 2 +-
 app/views/people/show.html.haml             | 2 +-
 app/views/people/show.mobile.haml           | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/views/people/_profile_sidebar.html.haml b/app/views/people/_profile_sidebar.html.haml
index 48bcd5b5a0..c731de4bee 100644
--- a/app/views/people/_profile_sidebar.html.haml
+++ b/app/views/people/_profile_sidebar.html.haml
@@ -35,7 +35,7 @@
       %br
       %hr{:style=>"width:300px;"}
 
-  -if (contact && !contact.pending?) || person == current_user.person || @incoming_request
+  -if (contact.persisted? && !contact.pending?) || person == current_user.person || @incoming_request
     %ul#profile_information
       %li
         - unless person.profile.bio.blank?
diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml
index d40ba3a1d1..928c90a082 100644
--- a/app/views/people/show.html.haml
+++ b/app/views/people/show.html.haml
@@ -8,7 +8,7 @@
 .span-8.append-1.last
   = render :partial => 'people/profile_sidebar', :locals => {:person => @person, :contact => @contact }
 
-  - if @contact && @contacts_of_contact.count > 0
+  - if @contact.persisted? && @contacts_of_contact.count > 0
     .span-8.last
       %hr{:style=>"width:300px;"}
       .section.contact_pictures
diff --git a/app/views/people/show.mobile.haml b/app/views/people/show.mobile.haml
index 95b0f4eda0..08e14a182e 100644
--- a/app/views/people/show.mobile.haml
+++ b/app/views/people/show.mobile.haml
@@ -7,7 +7,7 @@
     DIASPORA*
 
 #author_info.profile
-  - unless @contact || current_user.person == @person
+  - unless @contact.persisted? || current_user.person == @person
     .right
       = link_to "start sharing",
         {:controller => "contact",
@@ -24,7 +24,7 @@
       .description
         = @person.diaspora_handle
 
-- unless @contact || current_user.person == @person
+- unless @contact.persisted? || current_user.person == @person
   - if @incoming_request
     .floating
       %h3
-- 
GitLab