aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/profile_photo.rb3
-rw-r--r--app/models/user.rb1
2 files changed, 1 insertions, 3 deletions
diff --git a/app/models/profile_photo.rb b/app/models/profile_photo.rb
index 4cf32ef4b..0811978fe 100644
--- a/app/models/profile_photo.rb
+++ b/app/models/profile_photo.rb
@@ -23,8 +23,7 @@ class ProfilePhoto < ActiveRecord::Base
WIDTH = 96
HEIGHT = 96
- has_one :user
- validates_presence_of :user
+ # has_one :user
# deliberately don't strip_attributes, so keeps raw photo properly
diff --git a/app/models/user.rb b/app/models/user.rb
index 4cd3394b4..00fd332ad 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -283,7 +283,6 @@ class User < ActiveRecord::Base
old_profile_photo = self.profile_photo
self.profile_photo = nil
end
- new_profile_photo.user = self
self.profile_photo = new_profile_photo
end
if !old_profile_photo.nil?