Rewrite get_id_from_object()
Rewrite get_id_from_object()

This change makes the function more reliable, also,
the error messages are now saner.

openprocurement/robot_tests,kosaniak/robot_tests,Rzaporozhets/robot_tests