def save(self, *args, **kwargs): if not self.id: self.user = self.merchant.user self.enroll_key = generate_key() self.redeem_key = generate_key() self.reward_key = generate_key() super(Program, self).save(*args, **kwargs)
def save(self, *args, **kwargs): if not self.id: self.reward_passcode = generate_key() self.user = self.program.user super(ProgramStep, self).save(*args, **kwargs)