diff --git a/ruby/lib/jam_ruby/models/band.rb b/ruby/lib/jam_ruby/models/band.rb index 4589d20cd..56161d067 100644 --- a/ruby/lib/jam_ruby/models/band.rb +++ b/ruby/lib/jam_ruby/models/band.rb @@ -189,7 +189,7 @@ module JamRuby return band end - def update_avatar(original_fpfile, cropped_fpfile, crop_selection, aws_bucket) + def update_photo(original_fpfile, cropped_fpfile, crop_selection, aws_bucket) self.updating_photo = true cropped_s3_path = cropped_fpfile["key"] @@ -203,9 +203,9 @@ module JamRuby ) end - def delete_avatar(aws_bucket) + def delete_photo(aws_bucket) - User.transaction do + Band.transaction do unless self.cropped_s3_path.nil? S3Util.delete(aws_bucket, File.dirname(self.cropped_s3_path) + '/cropped.jpg')