Skip to content
Snippets Groups Projects
Commit 0e0957c7 authored by Alexander Olofsson's avatar Alexander Olofsson
Browse files

Ignore WQL errors

parent 1cccd986
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ class WdsServer < ApplicationRecord ...@@ -44,7 +44,7 @@ class WdsServer < ApplicationRecord
end end
def clients def clients
objects = connection.run_wql('SELECT * FROM MSFT_WdsClient')[:msft_wdsclient] objects = connection.run_wql('SELECT * FROM MSFT_WdsClient')[:msft_wdsclient] rescue nil
objects = nil if objects.empty? objects = nil if objects.empty?
objects ||= begin objects ||= begin
data = connection.shell(:powershell) do |s| data = connection.shell(:powershell) do |s|
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment