1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-23 08:51:13 +00:00

place the '.' on the previous line of the method call at app/models/attachment.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@20654 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2020-12-17 13:09:50 +00:00
parent ee877f6c2e
commit 0beee7746e

View File

@ -498,12 +498,12 @@ class Attachment < ActiveRecord::Base
def reuse_existing_file_if_possible
original_diskfile = nil
reused = with_lock do
if existing = Attachment
.where(digest: self.digest, filesize: self.filesize)
.where('id <> ? and disk_filename <> ?',
self.id, self.disk_filename)
.order(:id)
.last
if existing = Attachment.
where(digest: self.digest, filesize: self.filesize).
where('id <> ? and disk_filename <> ?',
self.id, self.disk_filename).
order(:id).
last
existing.with_lock do
original_diskfile = self.diskfile
existing_diskfile = existing.diskfile