Display IPN and pipe char only if IPN exists

This commit is contained in:
eeintech 2020-10-18 14:37:35 -05:00
parent d1df647dde
commit dfa4d3f8ed

View File

@ -427,8 +427,9 @@ class SupplierPart(models.Model):
if self.part.IPN: if self.part.IPN:
s += f'{self.part.IPN}' s += f'{self.part.IPN}'
s += ' | '
s += f' | {self.supplier.name} | {self.SKU}' s += f'{self.supplier.name} | {self.SKU}'
if self.manufacturer_string: if self.manufacturer_string:
s = s + ' | ' + self.manufacturer_string s = s + ' | ' + self.manufacturer_string