InvenTree: Error migrating manufacturer
make migrate fails after merge of #716
Trace after “migration to company object requires user input” and so on. Python 3.8.2
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/home/chschlue/.local/lib/python3.8/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/home/chschlue/.local/lib/python3.8/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/chschlue/.local/lib/python3.8/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/chschlue/.local/lib/python3.8/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/home/chschlue/.local/lib/python3.8/site-packages/django/core/management/base.py", line 83, in wrapped
res = handle_func(*args, **kwargs)
File "/home/chschlue/.local/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 232, in handle
post_migrate_state = executor.migrate(
File "/home/chschlue/.local/lib/python3.8/site-packages/django/db/migrations/executor.py", line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/home/chschlue/.local/lib/python3.8/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/home/chschlue/.local/lib/python3.8/site-packages/django/db/migrations/executor.py", line 245, in apply_migration
state = migration.apply(state, schema_editor)
File "/home/chschlue/.local/lib/python3.8/site-packages/django/db/migrations/migration.py", line 124, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/home/chschlue/.local/lib/python3.8/site-packages/django/db/migrations/operations/special.py", line 190, in database_forwards
self.code(from_state.apps, schema_editor)
File "/home/chschlue/inventree/InvenTree/company/migrations/0019_auto_20200413_0642.py", line 262, in associate_manufacturers
map_part_to_manufacturer(part, idx, part_count)
File "/home/chschlue/inventree/InvenTree/company/migrations/0019_auto_20200413_0642.py", line 143, in map_part_to_manufacturer
name = str(part.manufacturer_name)
AttributeError: 'SupplierPart' object has no attribute 'manufacturer_name'
make: *** [Makefile:15: migrate] Error 1
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (15 by maintainers)
Reverse migration worked.
How is DB restore supposed to be done, BTW? I only used “backup” before, hoping for “restore” to be implemented by the time I need it 😉