Fix bug.
This commit is contained in:
parent
e0e388faa6
commit
3bed92d2a9
|
@ -452,7 +452,7 @@ class Admin::AnnouncementsController < OrbitAdminController
|
||||||
http_req = Net::HTTP.new(uri.host, uri.port)
|
http_req = Net::HTTP.new(uri.host, uri.port)
|
||||||
if remote_url.include?('https')
|
if remote_url.include?('https')
|
||||||
http_req.use_ssl = true
|
http_req.use_ssl = true
|
||||||
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
http_req.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
||||||
end
|
end
|
||||||
response = http_request( http_req , request )
|
response = http_request( http_req , request )
|
||||||
end
|
end
|
||||||
|
@ -467,9 +467,9 @@ class Admin::AnnouncementsController < OrbitAdminController
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
|
related_feeds = @bulletin.get_related_feeds.select{|feed| feed.remote_urls.count != 0}
|
||||||
@bulletin.destroy
|
@bulletin.destroy
|
||||||
Thread.new do
|
Thread.new do
|
||||||
related_feeds = @bulletin.get_related_feeds.select{|feed| feed.remote_urls.count != 0}
|
|
||||||
if related_feeds.count != 0
|
if related_feeds.count != 0
|
||||||
tmp_data = {'type'=>'destroy', 'data'=>[@bulletin.uid]}
|
tmp_data = {'type'=>'destroy', 'data'=>[@bulletin.uid]}
|
||||||
request = Net::HTTP::Post.new('/xhr/feeds/notify_change', 'Content-Type' => 'application/json')
|
request = Net::HTTP::Post.new('/xhr/feeds/notify_change', 'Content-Type' => 'application/json')
|
||||||
|
|
Loading…
Reference in New Issue