-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 4.0.4
-
Fix Version/s: 4.1.0
-
Component/s: Direct Edit
-
Tags:
-
Sprint:nxDrive 11.1.3
-
Story Points:1
The error:
nxdrive.direct_edit Cannot unlock document '/UID_file-content/file.docx' Traceback (most recent call last): File "nxdrive\direct_edit.py", line 479, in _handle_lock_queue File "nxdrive\direct_edit.py", line 511, in _send_lock_status KeyError: 'cf92552e289611e9a04e9cda3ee6307e'
The fix:
diff --git a/nxdrive/direct_edit.py b/nxdrive/direct_edit.py index 8685c180..7e1da9f9 100644 --- a/nxdrive/direct_edit.py +++ b/nxdrive/direct_edit.py @@ -525,9 +525,8 @@ class DirectEdit(Worker): def _send_lock_status(self, ref: str) -> None: manager = self._manager - for engine in manager._engine_definitions: - dao = manager._engines[engine.uid]._dao - state = dao.get_normal_state_from_remote(ref) + for engine in manager._engines.values(): + state = engine._dao.get_normal_state_from_remote(ref) if state: path = engine.local_folder / state.local_path manager.osi.send_sync_status(state, path)
A test should be added to prevent regression.