Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1616

Prevent double lock when DirectEdit'ing a document

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.0
    • Fix Version/s: 4.1.3
    • Component/s: Direct Edit

      Description

      Errors

      We can see that we are trying to lock temporary and ignored files:

      HTTPError: HTTPError(500), error: Failed to invoke operation: Document.Lock, Failed to invoke operation Document.Lock, Document already locked by USERNAME: DOCUID, server trace: None
      (1 additional frame(s) were not displayed)
      ...
        File "nxdrive/client/remote_client.py", line 525, in lock
          command="Document.Lock", input_obj=f"doc:{self._check_ref(ref)}"
        File "nxdrive/client/remote_client.py", line 124, in execute
          raise e
        File "nxdrive/client/remote_client.py", line 117, in execute
          return self.operations.execute(**kwargs)
        File "nuxeo/operations.py", line 200, in execute
          default=kwargs.get('default', object))
        File "nuxeo/client.py", line 197, in request
          raise self._handle_error(exc)
      
      HTTPError: 500 Server Error:  for url: https://intranet.nuxeo.com/nuxeo/site/automation/Document.Lock
        File "nuxeo/client.py", line 194, in request
          resp.raise_for_status()
        File "requests/models.py", line 939, in raise_for_status
          raise HTTPError(http_error_msg, response=self)
      
      Cannot lock document PosixPath('DOCUID_file-content/.Nuxeo_Platform_7.x_technical_documentation (copie).pdf.nxpart')
      

      Sentry Issues:

      Fix

      We should check an eventual exception and on 500 error and ignore it if the message is about double locking for the current user

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h