Skip to content

Commit

Permalink
Merge pull request #731 from pact-foundation/fix/last_action_date-sho…
Browse files Browse the repository at this point in the history
…uld-consistently-return-datetime-object

fix: make sure last_action_date always returns a DateTime object
  • Loading branch information
pahnin authored Oct 25, 2024
2 parents 87669c3 + d60c264 commit 9653212
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/pact_broker/matrix/matrix_row_instance_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 9653212

Please sign in to comment.