Skip to content

Adding a custom field to a project raises exception #188

@cwbusacker

Description

@cwbusacker

Using Asana Package version 5.0.0

Trying to add a custom field in the following way:

 project_gid = project["gid"]
 api_response = projects_api.add_custom_field_setting_for_project( {"data": {"custom_field": "1201039880834721"}}, project_gid)

causes the following exception:

  File "/****/create_asana_projects.py", line 106, in command
    api_response = projects_api.add_custom_field_setting_for_project( {"data": {"custom_field": "1201039880834721"}}, project_gid)
  File "/****/lib/python3.10/site-packages/asana/api/projects_api.py", line 55, in add_custom_field_setting_for_project
    (data) = self.add_custom_field_setting_for_project_with_http_info(body, project_gid, **kwargs)  # noqa: E501
  File "/****/lib/python3.10/site-packages/asana/api/projects_api.py", line 144, in add_custom_field_setting_for_project_with_http_info
    (data) = self.api_client.call_api(
  File "/****/lib/python3.10/site-packages/asana/api_client.py", line 336, in call_api
    query_params = [(k, v) for k, v in query_params.items()]
AttributeError: 'list' object has no attribute 'items'

Editing the source code in call_api appears to fix it, but not sure if that could break it elsewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions