diff --git a/orchestra/contrib/orchestration/models.py b/orchestra/contrib/orchestration/models.py index 95e0e4d4..14e8db2d 100644 --- a/orchestra/contrib/orchestration/models.py +++ b/orchestra/contrib/orchestration/models.py @@ -51,8 +51,9 @@ class Server(models.Model): def clean(self): self.name = self.name.strip() - self.address = self.address.strip() - if self.name and not self.address: + if self.address: + self.address = self.address.strip() + elif self.name: validate = OrValidator(validate_ip_address, validate_hostname) validate_hostname(self.name) try: