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:
|
||||
ureg.Unit(part.units)
|
||||
continue
|
||||
except pint.errors.UndefinedUnitError:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Check a lower-case version
|
||||
|
|
@ -52,7 +52,7 @@ def migrate_part_units(apps, schema_editor):
|
|||
part.save()
|
||||
n_converted += 1
|
||||
continue
|
||||
except pint.errors.UndefinedUnitError:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
found = False
|
||||
|
|
|
|||
Loading…
Reference in New Issue