Tweak: improve tag parent validation error handling (#11096)

This commit is contained in:
shamoon authored and GitHub committed 2025-10-20 22:42:01 -07:00
1 parent a206ac78dd
commit fcae006afa
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -132,7 +132,7 @@ class Tag(MatchingModel, TreeNodeModel):
height = 0 if self.pk is None else self.get_depth()
deepest_new_depth = (new_parent_depth + 1) + height
if deepest_new_depth > self.MAX_NESTING_DEPTH:
raise ValidationError(_("Maximum nesting depth exceeded."))
raise ValidationError({"parent": _("Maximum nesting depth exceeded.")})
return super().clean()