Skip to content

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

@briang1

Description

@briang1
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions