Check that DB is active before looking up payload
parent
6bcdda4bd1
commit
f873d94c10
|
@ -224,16 +224,20 @@ protected
|
|||
# Pass along any associated payload uuid if specified
|
||||
if opts[:payload_uuid]
|
||||
s.payload_uuid = opts[:payload_uuid]
|
||||
payload_info = {
|
||||
uuid: s.payload_uuid.puid_hex,
|
||||
workspace: framework.db.workspace
|
||||
}
|
||||
if s.payload_uuid.respond_to?(:puid_hex) && (uuid_info = framework.db.payloads(payload_info).first)
|
||||
s.payload_uuid.registered = true
|
||||
s.payload_uuid.name = uuid_info['name']
|
||||
s.payload_uuid.timestamp = uuid_info['timestamp']
|
||||
else
|
||||
s.payload_uuid.registered = false
|
||||
s.payload_uuid.registered = false
|
||||
|
||||
if framework.db.active
|
||||
payload_info = {
|
||||
uuid: s.payload_uuid.puid_hex,
|
||||
workspace: framework.db.workspace
|
||||
}
|
||||
if s.payload_uuid.respond_to?(:puid_hex) && (uuid_info = framework.db.payloads(payload_info).first)
|
||||
s.payload_uuid.registered = true
|
||||
s.payload_uuid.name = uuid_info['name']
|
||||
s.payload_uuid.timestamp = uuid_info['timestamp']
|
||||
else
|
||||
s.payload_uuid.registered = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue