fix: uploading xlsx with font bigger than 14
This commit is contained in:
		@@ -1,5 +1,6 @@
 | 
			
		||||
from io import BytesIO
 | 
			
		||||
from typing import Optional
 | 
			
		||||
from unittest import mock
 | 
			
		||||
 | 
			
		||||
from openpyxl.reader.excel import load_workbook
 | 
			
		||||
from openpyxl.utils.cell import get_column_letter
 | 
			
		||||
@@ -133,7 +134,10 @@ class DealParser:
 | 
			
		||||
        return rows
 | 
			
		||||
 | 
			
		||||
    async def parse(self, file_bytes: bytes) -> ParseDealsExcelResponse:
 | 
			
		||||
        wb = load_workbook(filename=BytesIO(file_bytes))
 | 
			
		||||
        p = mock.patch('openpyxl.styles.fonts.Font.family.max', new=100)
 | 
			
		||||
        p.start()
 | 
			
		||||
 | 
			
		||||
        wb = load_workbook(filename=BytesIO(file_bytes), data_only=True)
 | 
			
		||||
        ws = wb.worksheets[0]
 | 
			
		||||
 | 
			
		||||
        await self._parse_warehouses_and_marketplaces(ws)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user