From d60c264e59ba2dc31903a9a4236a97a0985f508b Mon Sep 17 00:00:00 2001 From: Phanindra Srungavarapu Date: Fri, 25 Oct 2024 11:37:16 +0530 Subject: [PATCH] fix: make sure last_action_date always returns a DateTime object --- lib/pact_broker/matrix/matrix_row_instance_methods.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/pact_broker/matrix/matrix_row_instance_methods.rb b/lib/pact_broker/matrix/matrix_row_instance_methods.rb index e7cf5e195..36adce960 100644 --- a/lib/pact_broker/matrix/matrix_row_instance_methods.rb +++ b/lib/pact_broker/matrix/matrix_row_instance_methods.rb @@ -129,7 +129,13 @@ def provider_version_order end def last_action_date - return_or_raise_if_not_set(:last_action_date) + date = return_or_raise_if_not_set(:last_action_date) + + if date.class == String + DateTime.parse(date) + else + date + end end def has_verification?