@receiver(post_student_info)<EOL>def applyVoucherCodeTemporarily(sender,**kwargs):
logger.debug('<STR_LIT>')<EOL>reg = kwargs.pop('<STR_LIT>')<EOL>voucherId = reg.data.get('<STR_LIT>','<STR_LIT>')<EOL>try:<EOL><INDENT>voucher = Voucher.objects.get(voucherId=voucherId)<EOL><DEDENT>except ObjectDoesNotExist:<EOL><INDENT>logger.debug('<STR_LIT>')<EOL>return<EOL><DEDENT>tvu = TemporaryVoucherUse(voucher=voucher,registration=reg,amount=<NUM_LIT:0>)<EOL>tvu.save()<EOL>logger.debug('<STR_LIT>')<EOL>
When the core registration system creates a temporary registration with a voucher code,
the voucher app looks for vouchers that match that code and creates TemporaryVoucherUse
objects to keep track of the fact that the voucher may be used.