From 659aa269de0f6198d4083d822b92fef5bcb1bc9f Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Tue, 22 Jan 2019 17:00:29 +1100 Subject: [PATCH] Fix creation of sample payment methods on staging Due to an unknown reason my chosen way of creating calculator and assigning it to a payment method didn't work in staging environment even though it was working in development. Without diving deeper into the cause of this, I decided to change the record assignments and fix the problem that way. --- lib/tasks/sample_data/payment_method_factory.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/sample_data/payment_method_factory.rb b/lib/tasks/sample_data/payment_method_factory.rb index 43fd43348f..43f0c49a4d 100644 --- a/lib/tasks/sample_data/payment_method_factory.rb +++ b/lib/tasks/sample_data/payment_method_factory.rb @@ -46,7 +46,7 @@ class PaymentMethodFactory description: description, distributor_ids: [enterprise.id] ) - card.calculator = calculator - card.save! + calculator.calculable = card + calculator.save! end end