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

inconsistent behaviour with date_object_value class #36

Open
TarekSalha opened this issue Jun 15, 2023 · 0 comments
Open

inconsistent behaviour with date_object_value class #36

TarekSalha opened this issue Jun 15, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@TarekSalha
Copy link

Describe the bug
in the setter for the value property, it is not possible to insert a date object, but only str or datetime's:

@value.setter
    def value(self, value):
        if isinstance(value, **datetime**):
            self._value = value
        else:
            if isinstance(value, six.string_types):
                value = parse(value).date()
                self._value = value

this is inconsistent with the API behaviour, that will return me with get_sheet() a date object inside the object_value property of a cell. but then, I am not able to write a date object, but need to isoformat it as string before sending it back to smartsheet with update_rows().

Expected behavior
the setter should be accepting date type as well to make it more convenient to use the object_value field.

Environment (please complete the following information):

  • OS: Windows 10
  • Smartsheet Python SDK Version: 3.0.2
  • Python Version: 3.9
@TarekSalha TarekSalha added the bug Something isn't working label Jun 15, 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