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

TagResponse color allowed_values should contain 'none' #184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thijsh
Copy link

@thijsh thijsh commented Oct 3, 2023

Asana API responds with color: null when default grey tags are created. This gets translated to 'none', which seems to be by design. The correct behavior is to accept a value of 'none' as a valid tag color. The same allowed_values are listed in the project_response.py.

@jv-asana
Copy link
Contributor

jv-asana commented Oct 5, 2023

Hi @thijsh, I think this might be an API bug. The color options don't seem consistent with each other (i.e., the list of project colors and list of tag colors are different) OR it might be that they are using the same list of color but one endpoint returns "none" for grey and the other returns null for grey.

For Project default color of grey the API returns "none"
For Tag default color of grey the API returns null

When the python library deserializes these values you will see that:

  • Project color of grey "none" -> "none" (string)
  • Tag color of grey null -> None (null value in python)

This is the correct behavior since we don't want the wrong mapping of null (None value) to "none" (String value) during deserialization

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants