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

CustomViewItem is missing a setter method #1729

Copy link
Copy link
@lavitz-blip

Description

@lavitz-blip
Issue body actions

Describe the bug
The CustomViewItem model in the TSC library is missing a setter method for the workbook attribute. While the @Property getter exists, attempting to assign a value to workbook results in an AttributeError. This prevents users from programmatically associating a workbook with a custom view during creation or update operations.

Versions
Details of your environment, including:

  • Tableau Server version: 2024.2.13
  • Python version: 3.12
  • TSC library version: 0.38

To Reproduce

Steps to reproduce the behavior:

1. Initialize a CustomViewItem object.
2. Attempt to set the workbook attribute:
`custom_view.workbook = workbook_item`
3. See error: AttributeError: can't set attribute 'workbook' (or property 'workbook' of 'CustomViewItem' object has no setter).

Results
Error creating custom view: property 'workbook' of 'CustomViewItem' object has no setter

Expected Behavior
The workbook attribute should have a corresponding @workbook.setter to allow for the assignment of WorkbookItem objects, consistent with other attributes like owner.

Proposed Fix
In tableauserverclient/models/custom_view_item.py, the following setter should be added:

`
@Property
def workbook(self) -> Optional[WorkbookItem]:
return self._workbook

@workbook.setter
def workbook(self, value: WorkbookItem):
self._workbook = value
`

Reactions are currently unavailable

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

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