mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	Int migration fix (#3323)
* Add fix for stock migration - Ensure the serial number is not too large when performing migration - Add unit test for data migration (cherry picked from commit661fbf0e3d) * Add similar fixes for PO and SO migrations (cherry picked from commitbde23c130c) * And similar fix for BuildOrder reference field (cherry picked from commitca0f4e0031) * Update unit tests for API plugin mixin class - API at previous target URL has changed - Simplier to use the github API as a test case (cherry picked from commitdfe3172b7d) * Revert test database name (cherry picked from commit53333c29c3) * Override default URL behaviour for unit test (cherry picked from commit2c12a69529)
This commit is contained in:
		@@ -28,6 +28,9 @@ def update_serials(apps, schema_editor):
 | 
			
		||||
            except Exception:
 | 
			
		||||
                serial = 0
 | 
			
		||||
 | 
			
		||||
        # Ensure the integer value is not too large for the database field
 | 
			
		||||
        if serial > 0x7fffffff:
 | 
			
		||||
            serial = 0x7fffffff
 | 
			
		||||
 | 
			
		||||
        item.serial_int = serial
 | 
			
		||||
        item.save()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user