2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 20:15:44 +00:00

Fix purchase order import form

This commit is contained in:
Oliver
2021-07-15 23:11:59 +10:00
parent c61fc7c1df
commit 09d175f7cf
4 changed files with 11 additions and 9 deletions

View File

@ -99,13 +99,18 @@ class FileManager:
self.update_headers()
def guess_header(self, header, threshold=80):
""" Try to match a header (from the file) to a list of known headers
"""
Try to match a header (from the file) to a list of known headers
Args:
header - Header name to look for
threshold - Match threshold for fuzzy search
"""
# Replace null values with empty string
if header is None:
header = ''
# Try for an exact match
for h in self.HEADERS:
if h == header: