(params, record, rq_param)
| 155 | return total_updates - len(failed_updates) |
| 156 | |
| 157 | def attach_security_data(params, record, rq_param): |
| 158 | # type: (KeeperParams, Union[str, Dict[str, any], KeeperRecord], Union[record_pb2.RecordUpdate, record_pb2.RecordAdd]) -> Union[record_pb2.RecordUpdate, record_pb2.RecordAdd] |
| 159 | try: |
| 160 | if not isinstance(record, TypedRecord): |
| 161 | if isinstance(record, dict): |
| 162 | record['version'] = record.get('version', 3) |
| 163 | record = KeeperRecord.load(params, record) |
| 164 | if needs_security_audit(params, record): |
| 165 | rq_param.securityData.data = prep_security_data(params, record) |
| 166 | rq_param.securityScoreData.data = prep_score_data(record) |
| 167 | except: |
| 168 | pass |
| 169 | return rq_param |
| 170 | |
| 171 | def get_security_data_key_type(params): |
| 172 | return record_pb2.ENCRYPTED_BY_PUBLIC_KEY_ECC if params.forbid_rsa \ |
no test coverage detected