File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 6
6
from django import forms
7
7
from django .contrib .contenttypes .models import ContentType
8
8
from django .utils .safestring import mark_safe
9
- from extras .models import Tag
10
9
from ipam .models import Prefix
11
10
from netbox .forms import NetBoxModelForm
12
- from utilities .forms import (
13
- CommentField ,
14
- DynamicModelChoiceField ,
15
- DynamicModelMultipleChoiceField ,
16
- )
11
+ from utilities .forms import CommentField , DynamicModelChoiceField
17
12
from virtualization .models import (
18
13
Cluster ,
19
14
ClusterGroup ,
@@ -239,11 +234,11 @@ def clean(self):
239
234
if self .instance .pk :
240
235
# Check if Access List has no existing rules before change the Access List's type.
241
236
if (
242
- acl_type == ACLTypeChoices .TYPE_EXTENDED
243
- and self .instance .aclstandardrules .exists ()
237
+ acl_type == ACLTypeChoices .TYPE_EXTENDED
238
+ and self .instance .aclstandardrules .exists ()
244
239
) or (
245
- acl_type == ACLTypeChoices .TYPE_STANDARD
246
- and self .instance .aclextendedrules .exists ()
240
+ acl_type == ACLTypeChoices .TYPE_STANDARD
241
+ and self .instance .aclextendedrules .exists ()
247
242
):
248
243
error_message ["type" ] = [
249
244
"This ACL has ACL rules associated, CANNOT change ACL type." ,
You can’t perform that action at this time.
0 commit comments