Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

[FIX]product_configurator : fix issue- IndexError: tuple index out of range. #164

Open
wants to merge 1 commit into
base: 10.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions product_configurator/models/product_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ def compute_domain(self):
line.value_ids.ids)
)
# ensure 2 operands follow the last operator
computed_domain.append(
(lines[-1].attribute_id.id,
lines[-1].condition,
lines[-1].value_ids.ids)
)
if lines:
computed_domain.append(
(lines[-1].attribute_id.id,
lines[-1].condition,
lines[-1].value_ids.ids)
)
return computed_domain

name = fields.Char(
Expand Down