Commit 3b093e12 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

cyclades: Fix bug in getting a free floating IP

Fix wrong query which resulted in getting non-floating IPs.
parent 7782c001
......@@ -176,7 +176,8 @@ def get_free_floating_ip(userid, network=None):
"""
floating_ips = IPAddress.objects\
.filter(userid=userid, deleted=False, nic=None)
.filter(userid=userid, deleted=False, nic=None,
floating_ip=True)
if network is not None:
floating_ips = floating_ips.filter(network=network)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment