def get_data_sensors(): sensors = EquipmentModel.find_by(type="Sensor", order_by=EquipmentModel.name, get_first=False) return response.model_to_response(sensors)
def test_equipment_model(self): equipment: EquipmentModel = EquipmentModel.find_by(name="DATACUBE") self.assertIsNotNone(equipment) print(equipment.to_dict())
def get_data_loggers(): dataloggers = EquipmentModel.find_by(type="Datalogger", order_by=EquipmentModel.manufactory, get_first=False) return response.model_to_response(dataloggers)