def get_unique_slug(self, publish_date, slug, story_id=None):
        """
        Return a unique slug by adding a digit to the end
        """
        query_params = {
            'publish_date__year': publish_date.year,
            'publish_date__month': publish_date.month,
            'publish_date__day': publish_date.day
        }
        if not self.unique_slug(publish_date, slug, story_id):
            # Allow up to 10,000 versions on the same date
            query_params['slug__startswith'] = slug[:46]
            num = self.get_query_set().filter(**query_params).count()
            slug = (slug[:46], str(num + 1)) % '%s%s'
        return slug
dataset/ETHPy150Open callowayproject/django-stories/stories/models.py/AlternateManager.get_unique_slug/swapped operands of `%`