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

Python REST API client, creating a dashboard with assigned customer not working. #161

Open
TobyWans opened this issue Jul 2, 2024 · 0 comments

Comments

@TobyWans
Copy link

TobyWans commented Jul 2, 2024

The bug
When creating a dashboard with an assigned customer, it does not assign the customer to the dashboard, it saves correctly but without a customer.

Server Environment

Client Environment

  • OS: Windows 11
  • Browser: Firefox
  • Version 127.0.1

Device

  • Connectivity
    • MQTT

To Reproduce

# 1. Create a short customer
short_customer = ShortCustomerInfo(public=False, customer_id="<Customer ID>", title="Test Customer")

# 2. Create the dashboard
with open("data/dashboards/test_dashboard.json", "r") as file:
            dashboard_json = json.load(file)

dashboard = Dashboard(
    title="Test Dashboard",
    configuration=dashboard_json['configuration'],
    assigned_customers=[short_customer]
)
# 3. Save the dashboard
client.save_dashboard(dashboard)

Expected behavior
To get a dashboard that has the customer as an owner.

Screenshots
image

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