diff --git a/InvenTree/build/migrations/0032_auto_20211014_0632.py b/InvenTree/build/migrations/0032_auto_20211014_0632.py index ea6d5c954d..1ae56af4e6 100644 --- a/InvenTree/build/migrations/0032_auto_20211014_0632.py +++ b/InvenTree/build/migrations/0032_auto_20211014_0632.py @@ -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()