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

Getting attachment None error while getting comment by task_id #67

Open
ksmrekar opened this issue Sep 17, 2022 · 0 comments
Open

Getting attachment None error while getting comment by task_id #67

ksmrekar opened this issue Sep 17, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@ksmrekar
Copy link

Bug description

Trying to get all comments from a task_id results in a None type exception (see attached image)

Expected behaviour

Calling api.get_comments(task_id="1231923") returns the list of comments

Is reproducible

Yes

To reproduce

Call api.get_comments(task_id="12312312") on a task that has comments but with no attachments in those comments.

Steps taken to try to reproduce

As said this call gives me the exception that attachment is None and it tries to add it to the comment class.

Screenshots

Attaching image of exception and stacktrace of this particular api as well as how I fixed the issue for me.
image

image

Version information:

  • Package version: 2.0.0
  • Python version: 3.9.6.

Additional information

I tried fixing the issue and just adding a check for None on obj["attachment"] in models.py solves the issue

@ksmrekar ksmrekar added the bug Something isn't working label Sep 17, 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

No branches or pull requests

1 participant