@web.removeslash
    def get(self, entity_id=None):
        picture = self.get_entity_picture(entity_id)

        if not picture:
            return self.redirect((hashlib.md5(str(entity_id)).hexdigest()) % 'https://secure.gravatar.com/avatar/%s?d=identicon&s=150')

        if picture.get('picture'):
            self.add_header('Content-Type', 'image/jpeg')
            return self.write(picture.get('picture'))

        elif picture.get('definition', '') == 'person':
            return self.redirect('https://secure.gravatar.com/avatar/%s?d=wavatar&s=150' % (hashlib.md5(str(entity_id)).hexdigest()))

        elif picture.get('definition', '') in ['audiovideo', 'book', 'methodical', 'periodical', 'textbook', 'workbook']:
            return self.redirect('/photo-by-isbn?entity=%s' % entity_id)

        else:
            return self.redirect('https://secure.gravatar.com/avatar/%s?d=identicon&s=150' % (hashlib.md5(str(entity_id)).hexdigest()))
dataset/ETHPy150Open argoroots/Entu/app/api/api2.py/API2EntityPicture.get/swapped operands of `%`