@@ -210,7 +210,11 @@ class Communication(models.Model):
"""
if self.source.entity == self.destination.entity:
raise ValidationError('Source and destination entities must differ.')
raise ValidationError('Source and destination entities are identical.')
if self.source.entity.project != self.destination.entity.project:
raise ValidationError('Source and destination entities do not belong to the same project')
if (self.protocol.upper(), self.protocol.upper()) not in self.PROTOCOL_CHOICES:
raise ValidationError('%s is not a supported protocol.' % self.protocol)