thingsboard-python-rest-client
thingsboard-python-rest-client copied to clipboard
Python REST API client, creating a dashboard with assigned customer not working.
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