From 86c1d6c5875943f0d149d70f527231cf1fc23bb9 Mon Sep 17 00:00:00 2001 From: esensar Date: Thu, 20 Sep 2018 00:54:08 +0200 Subject: [PATCH] Resolve dependency cycle for device config --- app/devices/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/devices/__init__.py b/app/devices/__init__.py index 95ceab5..7ad4b9d 100644 --- a/app/devices/__init__.py +++ b/app/devices/__init__.py @@ -2,7 +2,6 @@ import sys from flask import Blueprint from .models import Device, Recording, DeviceAssociation, DeviceType from app import app -from app.mqtt.mqtt_client import MqttClient devices_bp = Blueprint('devices', __name__) @@ -49,6 +48,7 @@ def set_device_configuration(device_id, configuration_json): :type configuration_json: JSON :rtype: Boolean """ + from app.mqtt.mqtt_client import MqttClient device = Device.get(id=device_id) device.configuration = configuration_json device.save()