You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means that the budget.columns.find() function won't work as expected since we assumed all id would be integers:
deffind(self, company_id, project_id, budget_view_id, identifier):
""" Finds specified budget view column by looping through the results from get_budget_columns() Parameters ---------- company_id : int unique identifier for the company project_id : int unique identifier for the project budget_view_id : int unique identifier for the budget view identifier : int or str identifier for view which can be an id (int) or name (str) Returns ------- column : dict column data Raises ------ NotFoundItemError """ifisinstance(identifier, int):
key="id"else:
key="name"forcolumninself.get_budget_columns(company_id=company_id, project_id=project_id, budget_view_id=budget_view_id):
ifcolumn[key] ==identifier:
returncolumnraiseNotFoundItemError(f"Could not find column {identifier}")
Expected behavior
So we need to update the function so that we can use strings with id. Perhaps this is some flag instead or we try with all entries on the id first and then search by string.
Additional context
This discovery might have ramifications across multiple resources and not just columns which means updating everything. If we do end up including a flag input, then, for consistencies-sake, we would need to update allfind() methods.
The text was updated successfully, but these errors were encountered:
Current Behavior
Looking at the response from
budget.columns.get()
function, there are columns withid
values of both strings and integers.This means that the
budget.columns.find()
function won't work as expected since we assumed allid
would be integers:Expected behavior
So we need to update the function so that we can use strings with
id
. Perhaps this is some flag instead or we try with all entries on theid
first and then search by string.Additional context
This discovery might have ramifications across multiple resources and not just columns which means updating everything. If we do end up including a flag input, then, for consistencies-sake, we would need to update all
find()
methods.The text was updated successfully, but these errors were encountered: