From 3525bee1c21514a322a082b05ea54209f59bab61 Mon Sep 17 00:00:00 2001 From: Leo Kirchner Date: Mon, 28 Oct 2024 13:47:17 +0100 Subject: [PATCH 1/2] Merge pull request #590 from Kircheneer/improve-contrib-error-messaging improves error message for contrib validated save --- changes/590.changed | 1 + nautobot_ssot/contrib/model.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changes/590.changed diff --git a/changes/590.changed b/changes/590.changed new file mode 100644 index 000000000..213bb79f2 --- /dev/null +++ b/changes/590.changed @@ -0,0 +1 @@ +Improved error message for validated save in contrib model. \ No newline at end of file diff --git a/nautobot_ssot/contrib/model.py b/nautobot_ssot/contrib/model.py index 3d7845db6..30c95a4f8 100644 --- a/nautobot_ssot/contrib/model.py +++ b/nautobot_ssot/contrib/model.py @@ -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. From 35d7280ca50e2e9bf9380369e0fb3bb321ff43c9 Mon Sep 17 00:00:00 2001 From: Leo Kirchner Date: Mon, 28 Oct 2024 13:53:31 +0100 Subject: [PATCH 2/2] fix 1.5 release notes --- changes/590.fixed | 1 + docs/admin/release_notes/version_1.5.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changes/590.fixed diff --git a/changes/590.fixed b/changes/590.fixed new file mode 100644 index 000000000..3760861e0 --- /dev/null +++ b/changes/590.fixed @@ -0,0 +1 @@ +Fixed link in 1.5 release notes. \ No newline at end of file diff --git a/docs/admin/release_notes/version_1.5.md b/docs/admin/release_notes/version_1.5.md index ddf128252..db0b939d9 100644 --- a/docs/admin/release_notes/version_1.5.md +++ b/docs/admin/release_notes/version_1.5.md @@ -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