Advertisement
Guest User

Untitled

a guest
Apr 5th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. (Pdb) env
  2. {'current_date': datetime.datetime(2018, 4, 5, 8, 49, 39, 142003), 'self': {}, 'context': {}, 'time': <module 'time' (built-in)>}
  3. (Pdb) from trytond.pyson import PYSONEncoder
  4. t = PYSONEncoder().encode(Eval('self', {}).get('state') == 'blank')
  5. (Pdb) PYSONDecoder(env).decode(t)
  6. False
  7. (Pdb) bool(PYSONDecoder(env).decode(t))
  8. False
  9. (Pdb) bool(PYSONDecoder(env).decode('true'))
  10. True
  11. (Pdb) PYSONDecoder(env).decode('true')
  12. True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement