mirror of
https://github.com/grassrootseconomics/farmstar-survey-backend.git
synced 2024-12-12 19:26:09 +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(
|
inverseTransactionRecord, err := r.pb.Dao().FindFirstRecordByFilter(
|
||||||
"transactions",
|
"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{
|
dbx.Params{
|
||||||
"completed": false,
|
"completed": false,
|
||||||
"quantity": transactionRecord.GetInt("evergrow_quantity"),
|
"quantity": transactionRecord.GetInt("evergrow_quantity"),
|
||||||
"initiator": counterpartyRecord.GetId(),
|
"initiator": counterpartyRecord.GetId(),
|
||||||
"counterparty": initiatorRecord.GetId(),
|
"counterparty": initiatorRecord.GetId(),
|
||||||
|
"tx_date": transactionRecord.GetDateTime("tx_date"),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
if err != nil && err != sql.ErrNoRows {
|
if err != nil && err != sql.ErrNoRows {
|
||||||
|
Loading…
Reference in New Issue
Block a user