Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

inconsistent behaviour with date_object_value class #36

Copy link
Copy link
@TarekSalha

Description

@TarekSalha
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.