File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -288,14 +288,18 @@ def copy_attributes_to_variant(item, variant):
288288
289289 variant .variant_of = item .name
290290
291- if not variant .description :
292- variant .description = ""
293-
294291 if 'description' not in allow_fields :
295- if item .variant_based_on == 'Item Attribute' and not variant .description :
296- variant .description = "<div><b>" + item .name + "</b></div>"
297- for d in variant .attributes :
298- variant .description += "<div><b>" + d .attribute + "</b>: " + cstr (d .attribute_value ) + "</div>"
292+ if not variant .description :
293+ variant .description = ""
294+
295+ if item .variant_based_on == 'Item Attribute' :
296+ if variant .attributes :
297+ attributes_description = item .description + " "
298+ for d in variant .attributes :
299+ attributes_description += "<div>" + d .attribute + ": " + cstr (d .attribute_value ) + "</div>"
300+
301+ if attributes_description not in variant .description :
302+ variant .description += attributes_description
299303
300304def make_variant_item_code (template_item_code , template_item_name , variant ):
301305 """Uses template's item code and abbreviations to make variant's item code"""
You can’t perform that action at this time.
0 commit comments