2
0
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 commit 661fbf0e3d)

* Add similar fixes for PO and SO migrations

(cherry picked from commit bde23c130c)

* And similar fix for BuildOrder reference field

(cherry picked from commit ca0f4e0031)

* 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 commit dfe3172b7d)

* Revert test database name

(cherry picked from commit 53333c29c3)

* Override default URL behaviour for unit test

(cherry picked from commit 2c12a69529)
This commit is contained in:
Oliver
2022-07-15 11:57:27 +10:00
committed by GitHub
parent 2635327c51
commit 2afd39356a
5 changed files with 106 additions and 0 deletions

View File

@ -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()