mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	billing: Move exempt_from_from_license_number_check to Customer model.
This belongs more on the Customer model, since this is a similar attribute to default_discount.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							4ca87d785b
						
					
				
				
					commit
					bae86ad3da
				
			@@ -72,7 +72,11 @@ def check_spare_licenses_available_for_adding_new_users(
 | 
			
		||||
    realm: Realm, number_of_users_to_add: int
 | 
			
		||||
) -> None:
 | 
			
		||||
    plan = get_current_plan_by_realm(realm)
 | 
			
		||||
    if plan is None or plan.automanage_licenses or plan.exempt_from_from_license_number_check:
 | 
			
		||||
    if (
 | 
			
		||||
        plan is None
 | 
			
		||||
        or plan.automanage_licenses
 | 
			
		||||
        or plan.customer.exempt_from_from_license_number_check
 | 
			
		||||
    ):
 | 
			
		||||
        return
 | 
			
		||||
 | 
			
		||||
    if plan.licenses() < get_latest_seat_count(realm) + number_of_users_to_add:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user