This function is used to validate transaction id and version compatibility :param trans_id: :param source_sid: :param target_sid: :return:
(trans_id, source_sid, target_sid)
| 988 | |
| 989 | |
| 990 | def compare_pre_validation(trans_id, source_sid, target_sid): |
| 991 | """ |
| 992 | This function is used to validate transaction id and version compatibility |
| 993 | :param trans_id: |
| 994 | :param source_sid: |
| 995 | :param target_sid: |
| 996 | :return: |
| 997 | """ |
| 998 | |
| 999 | status, error_msg, diff_model_obj, session_obj = \ |
| 1000 | check_transaction_status(trans_id) |
| 1001 | |
| 1002 | if error_msg == ERROR_MSG_TRANS_ID_NOT_FOUND: |
| 1003 | res = make_json_response(success=0, errormsg=error_msg, status=404) |
| 1004 | return False, res, None, None |
| 1005 | |
| 1006 | # Server version compatibility check |
| 1007 | status, msg = check_version_compatibility(source_sid, target_sid) |
| 1008 | if not status: |
| 1009 | res = make_json_response(success=0, errormsg=msg, status=428) |
| 1010 | return False, res, None, None |
| 1011 | |
| 1012 | return True, '', diff_model_obj, session_obj |
| 1013 | |
| 1014 | |
| 1015 | @socketio.on('connect', namespace=SOCKETIO_NAMESPACE) |
no test coverage detected