[SEBA-742] Validating Tech-profile ID only if the subscriber is not pre-provision (same validation as onu_sn)
Change-Id: I0ff4fbc785f3a0d2e1f0c867e742ff982547a3f8
diff --git a/xos/synchronizer/models/models.py b/xos/synchronizer/models/models.py
index c80cb63..fd25d01 100755
--- a/xos/synchronizer/models/models.py
+++ b/xos/synchronizer/models/models.py
@@ -251,9 +251,9 @@
if not volt_service.has_access_device(self.onu_device):
raise XOSValidationError("The onu_device you specified (%s) does not exists" % self.onu_device)
- # validate that the tech_profile_id actually exists
- if not self.validate_tech_profile_id():
- raise XOSValidationError("The technology profile you specified [%s] does not exist" % self.tech_profile_id)
+ # if the access network is managed by voltha, validate that the tech_profile_id actually exists
+ if not self.validate_tech_profile_id():
+ raise XOSValidationError("The technology profile you specified [%s] does not exist" % self.tech_profile_id)
super(RCORDSubscriber, self).save(*args, **kwargs)
self.invalidate_related_objects()