Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jira: remove redundant validation #9188

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

russoz
Copy link
Collaborator

@russoz russoz commented Nov 25, 2024

SUMMARY

In-code validation is never going to fail because filename is required=true.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

jira

@russoz russoz closed this Nov 25, 2024
@russoz russoz reopened this Nov 25, 2024
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) labels Nov 25, 2024
@@ -672,9 +672,6 @@ def operation_attach(self):
v = self.vars
filename = v.attachment.get('filename')
content = v.attachment.get('content')

if not any((filename, content)):
raise ValueError('at least one of filename or content must be provided')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not really equivalent, required=true also accepts an empty string, while this explicitly checks for a non-empty value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants