2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 04:26:44 +00:00

Merge pull request #1582 from eeintech/po_upload_duplicate_fix

Fixed duplicate check for PO file upload
This commit is contained in:
Oliver 2021-05-14 07:50:02 +10:00 committed by GitHub
commit 4e6764f952
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -449,8 +449,8 @@ class FileManagementFormView(MultiStepFormView):
if guess: if guess:
n = list(self.column_selections.values()).count(self.column_selections[col]) n = list(self.column_selections.values()).count(self.column_selections[col])
if n > 1: if n > 1 and self.column_selections[col] not in duplicates:
duplicates.append(col) duplicates.append(self.column_selections[col])
# Store extra context data # Store extra context data
self.extra_context_data = { self.extra_context_data = {

View File

@ -55,7 +55,7 @@
<td> <td>
{{ col }} {{ col }}
{% for duplicate in duplicates %} {% for duplicate in duplicates %}
{% if duplicate == col.name %} {% if duplicate == col.value %}
<div class='alert alert-danger alert-block text-center' role='alert' style='padding:2px; margin-top:6px; margin-bottom:2px'> <div class='alert alert-danger alert-block text-center' role='alert' style='padding:2px; margin-top:6px; margin-bottom:2px'>
<b>{% trans "Duplicate selection" %}</b> <b>{% trans "Duplicate selection" %}</b>
</div> </div>