Check DB is active before querying sessions
parent
fe7a832aa8
commit
6a6d92abc1
|
@ -620,12 +620,14 @@ class ReadableText
|
|||
'Indent' => indent,
|
||||
'SortIndex' => 1)
|
||||
|
||||
if framework.db.active
|
||||
framework.db.sessions.each do |session|
|
||||
unless session.closed_at.nil?
|
||||
row = create_mdm_session_row(session, show_extended)
|
||||
tbl << row
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
output << (tbl.rows.count > 0 ? tbl.to_s : "#{tbl.header_to_s}No inactive sessions.\n")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue