You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Yes, I was running the following code:
oldtx = #... list of transactions ...
newtx = get_all_transactions(...)
newtx = [t for t in newtx if t not in oldtx]
And noticed that if you compare two different instances of the same transaction (ie: they are different instances, but representing the same transaction with the same id) they equate to False.
Describe the solution you'd like
Implement __eq__ on transaction objects. Or a more general solution could be on model objects if they have an id field.
Describe alternatives you've considered
As a workaround, I made a set of existing IDs and filter my new transaction list against those.
Additional context
No response
The text was updated successfully, but these errors were encountered:
I realised one edge case, and that's where tags have been added to a transaction since the initial fetch (eg: via the app). I'm not sure the best way to handle this right now.
Is your feature request related to a problem? Please describe.
Yes, I was running the following code:
And noticed that if you compare two different instances of the same transaction (ie: they are different instances, but representing the same transaction with the same
id
) they equate toFalse
.Describe the solution you'd like
Implement
__eq__
on transaction objects. Or a more general solution could be on model objects if they have anid
field.Describe alternatives you've considered
As a workaround, I made a set of existing IDs and filter my new transaction list against those.
Additional context
No response
The text was updated successfully, but these errors were encountered: