Parcourir la source

Access local field only of the object is defined

Enis Afgan il y a 10 ans
Parent
commit
10cc795667
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      cloudbridge/providers/aws/resources.py

+ 1 - 1
cloudbridge/providers/aws/resources.py

@@ -528,7 +528,7 @@ class AWSSecurityGroup(BaseSecurityGroup):
             from_port=from_port,
             to_port=to_port,
             cidr_ip=cidr_ip,
-            src_group=src_group._security_group)
+            src_group=src_group._security_group if src_group else None)
 
 
 class AWSSecurityGroupRule(BaseSecurityGroupRule):