fix typo in check for isSubdomain

This commit is contained in:
Rachid Mrad 2023-10-18 15:57:20 -04:00
parent 51307d3b12
commit 5e316adfd4
No known key found for this signature in database
GPG key ID: EF38E4CEC4A8F3CF

View file

@ -313,7 +313,7 @@ class Domain(TimeStampedModel, DomainHelper):
NameserverError (if exception hit)
Returns:
None"""
if self.isSubdomain(nameserver) and (ip is None or ip == [] or ip != []):
if self.isSubdomain(nameserver) and (ip is None or ip == [] or ip == ['']):
raise NameserverError(code=nsErrorCodes.MISSING_IP, nameserver=nameserver)
elif not self.isSubdomain(nameserver) and (ip is not None and ip != [] and ip != ['']):