-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes #8941: Better error message for duplicate items #8968
Conversation
can you add the before and after screenshot? It will be easier to review the PR, Please check |
try: | ||
item = get_duplicates(lst).next() | ||
if item: | ||
return item |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of returning single item return list of duplicate items, e.g. if raw material has items A, B, B, C, C then return list [B, C] as multiple items
@mbauskar Sorry about that. Noted. |
if duplicate_items: | ||
li = [] | ||
for i in duplicate_items: | ||
li.append("<li>{0} on row {1}".format(i.item_code, i.idx)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
close the li tag <li>{0} on row {1}</li>
Also can we keep the message simple? Just join the list of items with <br>?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. That means no need for the <li>
tags?
No description provided.