Skip to content
This repository has been archived by the owner on Mar 19, 2018. It is now read-only.

Commit

Permalink
Correctly fix an assignemnt syntax issue
Browse files Browse the repository at this point in the history
  • Loading branch information
shortdudey123 committed Dec 6, 2015
1 parent ada4b1b commit 0861f62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mms/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ def restorejobs
def restorejob_create(type_value, group_id, cluster_id)
if type_value.length == 24
find_group(group_id).cluster(cluster_id).snapshot(type_value).create_restorejob
elsif datetime == (type_value == 'now' ? DateTime.now : DateTime.parse(type_value))
else
datetime == (type_value == 'now' ? DateTime.now : DateTime.parse(type_value))
fail('Invalid datetime. Correct `YYYY-MM-RRTH:m:sZ`') if datetime.nil?
datetime_string = [[datetime.year, datetime.month, datetime.day].join('-'), 'T', [datetime.hour, datetime.minute, datetime.second].join(':'), 'Z'].join
find_group(group_id).cluster(cluster_id).create_restorejob(datetime_string)
Expand Down

0 comments on commit 0861f62

Please sign in to comment.