Skip to content

Commit 333197f

Browse files
committed
refactor 📦 update exception message
1 parent 1b54029 commit 333197f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎oscar_odin/mappings/context.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ def bulk_update_or_create_many_to_many(self):
408408
# Instead of failing bulk_create here below, we will add an error.
409409
self.errors.add_error(
410410
OscarOdinException(
411-
f"Cannot create m2m relationship {Through.__name__} - related model '{relation.related_model.__name__}' is missing a primary key"
411+
{Through.__name__: f"Cannot create m2m relationship {Through.__name__} - related model '{relation.related_model.__name__}' is missing a primary key"}
412412
),
413413
instance,
414414
)

0 commit comments

Comments
 (0)