Skip to content

run_examples.py Pages code issue #104

@jasonaltenburg

Description

@jasonaltenburg

The comments in the file state:

- To run this example file:
-- Copy and paste the contents of this file
-- Plug in your CLIENT_ID and CLIENT_SECRET (https://developer.domo.com/manage-clients), and execute "python3 run_examples.py"

The Python script fails to execute at line 429 because owners is included in the page dict, but it is not accepted as pat of the page update API endpoint.

My solution was:

        # Update the page using returned page
        page['name'] = 'Updated Page'
        domo.logger.info("Page keys before update: {}".format(list(page.keys())))
        if 'owners' in page:
                del page['owners']  # Remove the unexpected 'owners' key
        domo.pages.update(**page)
        domo.logger.info("Renamed Page {}".format(page['id']))

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