mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 04:25:42 +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:
@ -24,6 +24,10 @@ def build_refs(apps, schema_editor):
|
||||
except Exception: # pragma: no cover
|
||||
ref = 0
|
||||
|
||||
# Clip integer value to ensure it does not overflow database field
|
||||
if ref > 0x7fffffff:
|
||||
ref = 0x7fffffff
|
||||
|
||||
build.reference_int = ref
|
||||
build.save()
|
||||
|
||||
|
Reference in New Issue
Block a user