Revision 3e316e90 snf-cyclades-app/synnefo/api/networks.py

b/snf-cyclades-app/synnefo/api/networks.py
175 175

  
176 176
    user_networks = len(Network.objects.filter(userid=request.user_uniq,
177 177
                                               deleted=False))
178
    if user_networks == settings.MAX_NETWORKS_PER_USER:
178

  
179
    if user_networks >= settings.MAX_NETWORKS_PER_USER:
179 180
        raise OverLimit('Network count limit exceeded for your account.')
180 181

  
181 182
    cidr_block = int(subnet.split('/')[1])

Also available in: Unified diff