Error message in the form when the voucher is invalid
This commit is contained in:
		@@ -19,6 +19,7 @@ class ExplorerCreationForm(UserCreationForm):
 | 
			
		||||
		try:
 | 
			
		||||
			fetched_voucher = Voucher.objects.get(code=sumitted_voucher)
 | 
			
		||||
		except Voucher.DoesNotExist:
 | 
			
		||||
			self.add_error('voucher', 'Invalid voucher')
 | 
			
		||||
			return False
 | 
			
		||||
 | 
			
		||||
		fetched_voucher.delete()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user