mirror of
https://github.com/grassrootseconomics/farmstar-survey-backend.git
synced 2024-12-12 11:16:10 +01:00
fix: check tx_date match when filtering for inverse record
This commit is contained in:
parent
8cb78eb2db
commit
a99907f2b9
@ -30,12 +30,13 @@ func (r *HooksContainer) bootstrapTransactionHook() {
|
||||
|
||||
inverseTransactionRecord, err := r.pb.Dao().FindFirstRecordByFilter(
|
||||
"transactions",
|
||||
"completed = {:completed} && evergrow_quantity = {:quantity} && initiator = {:initiator} && counterparty = {:counterparty}",
|
||||
"completed = {:completed} && evergrow_quantity = {:quantity} && initiator = {:initiator} && counterparty = {:counterparty} && tx_date = {:tx_date}",
|
||||
dbx.Params{
|
||||
"completed": false,
|
||||
"quantity": transactionRecord.GetInt("evergrow_quantity"),
|
||||
"initiator": counterpartyRecord.GetId(),
|
||||
"counterparty": initiatorRecord.GetId(),
|
||||
"tx_date": transactionRecord.GetDateTime("tx_date"),
|
||||
},
|
||||
)
|
||||
if err != nil && err != sql.ErrNoRows {
|
||||
|
Loading…
Reference in New Issue
Block a user