Merge pull request #17183 from netchampfaris/duplicate-variant-check-d

fix: Validate variant attributes only if is_new
This commit is contained in:
Nabin Hait 2019-04-15 10:08:28 +05:30 committed by GitHub
commit e7e2e93419
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -801,7 +801,7 @@ class Item(WebsiteGenerator):
attributes.append(d.attribute)
def validate_variant_attributes(self):
if self.variant_of and self.variant_based_on == 'Item Attribute':
if self.is_new() and self.variant_of and self.variant_based_on == 'Item Attribute':
args = {}
for d in self.attributes:
if cstr(d.attribute_value).strip() == '':