mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
Fix for migration file (#4901)
- Catch *all* exceptions when migrating (cherry picked from commit bcd068fc23637d815d7899d549f83b8bd8a26057)
This commit is contained in:
parent
01e2376748
commit
11f816a787
@ -41,7 +41,7 @@ def migrate_part_units(apps, schema_editor):
|
|||||||
try:
|
try:
|
||||||
ureg.Unit(part.units)
|
ureg.Unit(part.units)
|
||||||
continue
|
continue
|
||||||
except pint.errors.UndefinedUnitError:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Check a lower-case version
|
# Check a lower-case version
|
||||||
@ -52,7 +52,7 @@ def migrate_part_units(apps, schema_editor):
|
|||||||
part.save()
|
part.save()
|
||||||
n_converted += 1
|
n_converted += 1
|
||||||
continue
|
continue
|
||||||
except pint.errors.UndefinedUnitError:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
found = False
|
found = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user