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

Issue.issue_name not returned #29

Closed
Buried-In-Code opened this issue Jul 14, 2022 · 2 comments · Fixed by #30
Closed

Issue.issue_name not returned #29

Buried-In-Code opened this issue Jul 14, 2022 · 2 comments · Fixed by #30
Assignees
Labels
bug Something isn't working

Comments

@Buried-In-Code
Copy link
Member

Describe the bug
The Issue schema doesn't have issue_name marked as optional, however Metron doesn't always return this field and it doesn't raise an exception.

To Reproduce

  1. Make a call to result = session.issue(_id=39505)
  2. Try and access the issue_name field: result.issue_name
  3. An AttributeError is raised:

AttributeError: 'Issue' object has no attribute 'issue_name'

Expected behavior
It should either raise an exception or the field be Optional

Desktop (please complete the following information):

  • OS: Windows

Additional context

@Buried-In-Code Buried-In-Code added the bug Something isn't working label Jul 14, 2022
@bpepple
Copy link
Member

bpepple commented Jul 14, 2022

Looking at this more closely, I don't think this is really a bug. It is raising an AttributeError for a field that doesn't exist. It would raise the same error if you accessed: result.foo_bar, which is correct.

Where this should be addressed most likely is in the documentation since the issue_name field is only used for list results, since the detail views contains the information need to create the issue name (series_nameand number fields).

@Buried-In-Code
Copy link
Member Author

Ah right I see, good to know.

@bpepple bpepple linked a pull request Jul 19, 2022 that will close this issue
bpepple added a commit that referenced this issue Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants