mirror of
https://github.com/we-promise/sure.git
synced 2026-05-07 12:54:04 +00:00
fix(transactions): Ignore blank date in entry params (#1688)
Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com>
This commit is contained in:
@@ -446,6 +446,7 @@ class TransactionsController < ApplicationController
|
||||
nature = 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
|
||||
|
||||
Reference in New Issue
Block a user