Bug with order.orderstatus_set.latest()

3 views
Skip to first unread message

Thomas

unread,
Nov 21, 2012, 8:38:31 AM11/21/12
to satchm...@googlegroups.com
There are several places in the satchmo code where order.orderstatus_set.latest() is used.
For some reason, I have found that this always returns 'New' though. If instead I use the following:

order.orderstatus_set.latest('id')

then it works correctly, and returns the most recent orderstatus that was added.

Is this a bug, or am I just misunderstanding how it should work?

My problem exists in src/satchmo/satchmo/apps/payment/views/confirm.py in _onSuccess()

I think that perhaps nobody has stumbled into this because generally 'New' is what one would expect anyway. But I am in the situation where some action has been taken on the order, and the most recent status added to orderstatus is 'Billed'.
Reply all
Reply to author
Forward
0 new messages