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

Confusing behaviour by using Sheet objects #39

Open
beliaev-maksim opened this issue Aug 4, 2023 · 0 comments
Open

Confusing behaviour by using Sheet objects #39

beliaev-maksim opened this issue Aug 4, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@beliaev-maksim
Copy link

Describe the bug
As a python user you would expect that if you get Sheet object, then it will be the same object without further actions.

In the snippet below, you will see that we need to extra evaluate the Sheet again which is counterintuitive

To Reproduce

response = smart.Sheets.list_sheets()       # Call the list_sheets() function and store the response object
for sheet in response.data:
    if sheet.name == "plan":
        break
else:
    raise ValueError("No sheet with name 'plan' was found")

sheet = smart.Sheets.get_sheet(sheet.id)     # Need to load the sheet again, although, it is the same Sheet object

Expected behavior
I would expect the last evaluation to be not required or at least provide a method like Sheet.refresh() that will pull the data.

Environment (please complete the following information):

  • Smartsheet Python SDK Version [3.0.2]
  • Python Version [3.10]
@beliaev-maksim beliaev-maksim added the bug Something isn't working label Aug 4, 2023
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