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

Handle null properties in objects instantation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.0.1
    • Component/s: Framework

      Description

      Reported in the issue #602:

      Exception in thread Thread-13:
      Traceback (most recent call last):
        File "C:\Python36\lib\threading.py", line 916, in _bootstrap_inner
          self.run()
        File "C:\Python36\lib\threading.py", line 864, in run
          self._target(*self._args, **self._kwargs)
        File "C:\Users\nuxeo-drive\nxdrive\gui\folders_treeview.py", line 279, in load_children_thread
          children = list(self.client.get_children(parent_item))
        File "C:\Users\nuxeo-drive\nxdrive\gui\folders_treeview.py", line 154, in get_children
          RemoteFileInfo.from_dict(root), state=self.get_item_state(root["path"])
        File "C:\Users\nuxeo-drive\nxdrive\objects.py", line 73, in from_dict
          last_update = fs_item["lastModificationDate"] // 1000
      TypeError: unsupported operand type(s) for //: 'NoneType' and 'int'
      

      This shows a misinitialization of several fields in some objects. In fact, fs_item["lastModificationDate"] should always be an integer, and should equal to 0 rather than None. Other fields are impacted and should be reviewed accordingly.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 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 - 3 hours
                  3h