django-filebrowser-no-grappelli icon indicating copy to clipboard operation
django-filebrowser-no-grappelli copied to clipboard

base.py - sort_by_attr : '<' not supported between instances of 'float' and 'NoneType'

Open briang1 opened this issue 6 years ago • 1 comments

  • Python 3
  • Django 1.11.20
  • django-filebrowser-no-grappelli==3.7.8
  • botocore==1.12.183
  • boto3==1.9.183
  • django-storages==1.7.1

I am using django-storages/boto3 with a DigitalOcean space. While attempting to access /admin/filebrowser/browse/ I get the following error at base.py sort_by_attr function: '<' not supported between instances of 'float' and 'NoneType'

Not sure if this is unique to Digital Ocean spaces but a folder is included in the seq list of objects being sorted at return sorted(seq, key=attrgetter(*attr))

This folder object returns None for the various attributes (date, filesize, etc) causing the error.

Removing the folder object from the seq list seems to have fixed the issue without further consequence.

briang1 avatar Jul 08 '19 19:07 briang1

Hi @briang1 !

There is definitely some problem with boto3 as reported in #47 I don't use this feature, so I can't help here. But PRs are welcome.

smacker avatar Dec 04 '19 18:12 smacker