The personal finance app for everyone (by everyone)
Ruby
fix(transactions): Ignore blank date in entry params (#1688)
sentry[bot]4b93bdb44727
diff --git a/app/controllers/transactions_controller.rb b/app/controllers/transactions_controller.rbindex fea921ab4e..ce7e32438a 100644--- a/app/controllers/transactions_controller.rb+++ b/app/controllers/transactions_controller.rb@@ -446,6 +446,7 @@ class TransactionsController < ApplicationControllernature = entry_params.delete(:nature)entry_params.delete(:amount) if entry_params[:amount].blank?+ entry_params.delete(:date) if entry_params[:date].blank?if nature.present? && entry_params[:amount].present?signed_amount = nature == "inflow" ? -entry_params[:amount].to_d : entry_params[:amount].to_d