Merge branch 'enhancement/publisher_comment_minimum_required_chars' of https://github.com/BigRoy/ayon-core into enhancement/publisher_comment_minimum_required_chars

This commit is contained in:
Roy Nieterau 2025-05-22 23:16:32 +02:00
commit 94d0725b11
5 changed files with 16 additions and 13 deletions

View file

@ -842,16 +842,18 @@ class PublisherWindow(QtWidgets.QDialog):
def _validate_comment(self) -> bool:
# Validate comment length
comment_def = self._controller.get_comment_def()
if comment_def.minimum_chars_required:
char_count = len(self._comment_input.text())
if char_count < comment_def.minimum_chars_required:
self._overlay_object.add_message(
"Please enter a comment of at least "
f"{comment_def.minimum_chars_required} characters",
message_type="error"
)
self._invalidate_comment_field()
return False
char_count = len(self._comment_input.text())
if (
comment_def.minimum_chars_required
and char_count < comment_def.minimum_chars_required
):
self._overlay_object.add_message(
"Please enter a comment of at least "
f"{comment_def.minimum_chars_required} characters",
message_type="error"
)
self._invalidate_comment_field()
return False
return True
def _invalidate_comment_field(self):

View file

@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring AYON addon 'core' version."""
__version__ = "1.2.0+dev"
__version__ = "1.3.0+dev"