Skip to content

Commit

Permalink
Merge pull request #591 from Kircheneer/ltm-improve-contrib-error-mes…
Browse files Browse the repository at this point in the history
…saging

[LTM] Improved contrib error messaging (backport #590)
  • Loading branch information
jdrew82 authored Oct 28, 2024
2 parents ab7165a + 35d7280 commit 862e96a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions changes/590.changed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improved error message for validated save in contrib model.
1 change: 1 addition & 0 deletions changes/590.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed link in 1.5 release notes.
2 changes: 1 addition & 1 deletion docs/admin/release_notes/version_1.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
## Changed

- [206](https://github.com/nautobot/nautobot-plugin-ssot/pull/206) - Update docs pins for py3.7 compatibility by @cmsirbu
- [207][https://github.com/nautobot/nautobot-plugin-ssot/pull/207] Drop Python 3.7 Support by @jdrew82
- [207](https://github.com/nautobot/nautobot-plugin-ssot/pull/207) - Drop Python 3.7 Support by @jdrew82
4 changes: 3 additions & 1 deletion nautobot_ssot/contrib/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ def _update_obj_with_parameters(cls, obj, parameters, diffsync):
try:
obj.validated_save()
except ValidationError as error:
raise ObjectCrudException(f"Validated save failed for Django object. Parameters: {parameters}") from error
raise ObjectCrudException(
f"Validated save failed for Django object:\n{error}\nParameters: {parameters}"
) from error

# Handle relationship association creation. This needs to be after object creation, because relationship
# association objects rely on both sides already existing.
Expand Down

0 comments on commit 862e96a

Please sign in to comment.