mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	append api call
This commit is contained in:
		| @@ -404,17 +404,19 @@ def DownloadFile(data, filename, content_type='application/text', inline=False): | |||||||
|     return response |     return response | ||||||
|  |  | ||||||
|  |  | ||||||
| def extract_serial_numbers(serials, expected_quantity): | def extract_serial_numbers(serials, expected_quantity, next_number: int): | ||||||
|     """ Attempt to extract serial numbers from an input string. |     """ Attempt to extract serial numbers from an input string. | ||||||
|     - Serial numbers must be integer values |     - Serial numbers must be integer values | ||||||
|     - Serial numbers must be positive |     - Serial numbers must be positive | ||||||
|     - Serial numbers can be split by whitespace / newline / commma chars |     - Serial numbers can be split by whitespace / newline / commma chars | ||||||
|     - Serial numbers can be supplied as an inclusive range using hyphen char e.g. 10-20 |     - Serial numbers can be supplied as an inclusive range using hyphen char e.g. 10-20 | ||||||
|  |     - Serial numbers can be defined as ~ for getting the next available serial number | ||||||
|     - Serial numbers can be supplied as <start>+ for getting all expecteded numbers starting from <start> |     - Serial numbers can be supplied as <start>+ for getting all expecteded numbers starting from <start> | ||||||
|     - Serial numbers can be supplied as <start>+<length> for getting <length> numbers starting from <start> |     - Serial numbers can be supplied as <start>+<length> for getting <length> numbers starting from <start> | ||||||
|  |  | ||||||
|     Args: |     Args: | ||||||
|         expected_quantity: The number of (unique) serial numbers we expect |         expected_quantity: The number of (unique) serial numbers we expect | ||||||
|  |         next_number(int): the next possible serial number | ||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     serials = serials.strip() |     serials = serials.strip() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user