mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-11-12 08:53:56 +01:00
Replaced pylint by ruff
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
from typing import List
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib.auth import password_validation
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.shortcuts import get_object_or_404
|
||||
|
||||
@@ -240,9 +240,7 @@ class AdminGlobalParametersSerializer(serializers.Serializer):
|
||||
if not value:
|
||||
return value
|
||||
try:
|
||||
ip_addresses = [
|
||||
ipaddress.ip_network(v.strip()) for v in value.split() if v.strip()
|
||||
]
|
||||
[ipaddress.ip_network(v.strip()) for v in value.split() if v.strip()]
|
||||
except ValueError:
|
||||
raise serializers.ValidationError(
|
||||
_("This field only allows valid IP addresses (or networks)")
|
||||
|
||||
Reference in New Issue
Block a user