if machines.count() >= quota_total:
return 'You have too many VMs to create a new one.'
if len(active_machines) >= quota_active:
if machines.count() >= quota_total:
return 'You have too many VMs to create a new one.'
if len(active_machines) >= quota_active: