diff --git a/lib/models/ObjectMDAmzRestore.js b/lib/models/ObjectMDAmzRestore.js index 0b3ca1d1c..99a3435fc 100644 --- a/lib/models/ObjectMDAmzRestore.js +++ b/lib/models/ObjectMDAmzRestore.js @@ -28,10 +28,8 @@ class ObjectMDAmzRestore { */ static isValid(data) { try { - const restoreMD = new ObjectMDAmzRestore(false); - restoreMD.setOngoingRequest(data['ongoing-request']); - restoreMD.setExpiryDate(data['expiry-date']); - return true; + const object = new ObjectMDAmzRestore(data['ongoing-request'], data['expiry-date']); + return !!object; } catch (err) { return false; }