Commit a42666e0 by Bach Dániel

firewall: fix queryset in list_ports()

parent 071afcdd
......@@ -742,7 +742,7 @@ class Host(models.Model):
Return a list of ports with forwarding rules set.
retval = []
for rule in self.rules.all():
for rule in self.rules.filter(dport__isnull=False, direction='in'):
forward = {
'proto': rule.proto,
'private': rule.dport,
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 sign in to comment