Merge pull request #4228 from betagouv/dev

2019-08-21-01
This commit is contained in:
Paul Chavard 2019-08-21 11:14:04 +02:00 committed by GitHub
commit 239a824497
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View file

@ -39,7 +39,7 @@ function diplayMap(element, data, initial = false) {
}
}
addEventListener('ds:page:update', initialize);
addEventListener('turbolinks:load', initialize);
addEventListener('carte:update', ({ detail: { selector, data } }) => {
const element = document.querySelector(selector);

View file

@ -262,8 +262,10 @@ class Procedure < ApplicationRecord
if original_attachment.attached?
kopy.send(attribute).attach({
io: StringIO.new(original_attachment.download),
filename: original_attachment.blob.filename,
content_type: original_attachment.blob.content_type
filename: original_attachment.filename,
content_type: original_attachment.content_type,
# we don't want to run virus scanner on cloned file
metadata: { virus_scan_result: ActiveStorage::VirusScanner::SAFE }
})
end
end

View file

@ -2,6 +2,8 @@ require 'spec_helper'
describe IPService do
describe '.ip_trusted?' do
after(:each) { ENV['TRUSTED_NETWORKS'] = nil }
subject { IPService.ip_trusted?(ip) }
context 'when the ip is nil' do