Skip to content

Commit 0cff44d

Browse files
committed
Add default timestamp and valid_at values in case they are blank to prevent serialization error.
1 parent 360d6fb commit 0cff44d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rails_application/lib/transformations/refund_to_return_event_mapper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ def load(record)
1919
event_type: new_class_name,
2020
data: transformed_data,
2121
metadata: record.metadata,
22-
timestamp: record.timestamp,
23-
valid_at: record.valid_at
22+
timestamp: record.timestamp || Time.now.utc,
23+
valid_at: record.valid_at || Time.now.utc
2424
)
2525
else
2626
record

0 commit comments

Comments
 (0)