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

run_examples.py Pages code issue #104

Open
jasonaltenburg opened this issue Apr 16, 2024 · 0 comments
Open

run_examples.py Pages code issue #104

jasonaltenburg opened this issue Apr 16, 2024 · 0 comments

Comments

@jasonaltenburg
Copy link

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']))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant