def save(self, *args, **kwargs):
        # Signals and some bits of logic only happen on a new award.
        is_new = not self.pk

        # Bail if this is an attempt to double-award a unique badge
        if (is_new and self.badge.unique and
                self.badge.is_awarded_to(self.user)):
            raise BadgeAlreadyAwardedException()

        super(Progress, self).save(*args, **kwargs)

        # If the percent is over/equal to 1.0, auto-award on save.
        if self.percent >= 100:
            self.badge.award_to(self.user)
This inserts a user directly into the database. It assumes all data is valid.
dataset/ETHPy150Open mozilla/django-badger/badger/models.py/Progress.save--crossover with--dataset/ETHPy150Open IceCTF/ctf-platform/api/api/user.py/create_user