darklow / django-suit

Modern theme for Django admin interface
http://djangosuit.com/
Other
2.31k stars 701 forks source link

Row styling failing silently? #787

Open gamesbook opened 2 years ago

gamesbook commented 2 years ago

Seems row styling is failing. Code below does not result in any color changes and no errors that I can see. Python 3.7 and Django 1.18

    def suit_row_attributes(self, obj, request):
        logger.debug('color filler for %s', obj)
        try:
            css_class = {
                True: 'warning',
                False: '',
            }.get(obj.filler)
            if obj.filler is False:
                css_class = {
                    True: 'success',
                    False: '',
                }.get(obj.selected)
            if css_class:
                return {'class': css_class}
        except AttributeError as err:
            logger.error('Cannot color filler - %s', err)