Skip to content

Commit

Permalink
Failed migration from 0.16.9 -> 0.17.1 `multiple assignments to same …
Browse files Browse the repository at this point in the history
…column "status_custom_key"`

Fixes inventree#8796
  • Loading branch information
matmair committed Jan 5, 2025
1 parent ae1f9bf commit d8c12c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/backend/InvenTree/generic/states/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ def contribute_to_class(self, cls, name):
"""Add the _custom_key field to the model."""
cls._meta.supports_custom_status = True

if not hasattr(self, '_custom_key_field'):
if not hasattr(self, '_custom_key_field') and not hasattr(
cls, f'{name}_custom_key'
):
self.add_field(cls, name)

super().contribute_to_class(cls, name)
Expand Down

0 comments on commit d8c12c4

Please sign in to comment.