Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (Pdb) env
- {'current_date': datetime.datetime(2018, 4, 5, 8, 49, 39, 142003), 'self': {}, 'context': {}, 'time': <module 'time' (built-in)>}
- (Pdb) from trytond.pyson import PYSONEncoder
- t = PYSONEncoder().encode(Eval('self', {}).get('state') == 'blank')
- (Pdb) PYSONDecoder(env).decode(t)
- False
- (Pdb) bool(PYSONDecoder(env).decode(t))
- False
- (Pdb) bool(PYSONDecoder(env).decode('true'))
- True
- (Pdb) PYSONDecoder(env).decode('true')
- True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement