File tree 2 files changed +2
-4
lines changed
2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -122,8 +122,6 @@ def validate(self, data):
122
122
- Check that the GFK object is valid.
123
123
- Check if Access List has no existing rules before change the Access List's type.
124
124
"""
125
- error_message = {}
126
-
127
125
# Check that the GFK object is valid.
128
126
assigned_object = validate_gfk (data )
129
127
@@ -137,7 +135,7 @@ def validate(self, data):
137
135
{"type" : ["This ACL has ACL rules associated, CANNOT change ACL type." ]}
138
136
)
139
137
140
- if error_message :
138
+ if error_message := {} :
141
139
raise serializers .ValidationError (error_message )
142
140
143
141
return super ().validate (data )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ def test_root(self):
18
18
Test the API root
19
19
"""
20
20
url = reverse ("plugins-api:netbox_acls-api:api-root" )
21
- response = self .client .get ("{ }?format=api". format ( url ) , ** self .header )
21
+ response = self .client .get (f" { url } ?format=api" , ** self .header )
22
22
23
23
self .assertEqual (response .status_code , status .HTTP_200_OK )
24
24
You can’t perform that action at this time.
0 commit comments