From 36cdbe98dce26946489b7c39c6f57cfb07abf5e6 Mon Sep 17 00:00:00 2001 From: Marina Galvagni <96880748+margalva@users.noreply.github.com> Date: Tue, 12 Sep 2023 11:16:05 -0400 Subject: [PATCH] Set obj_name for ADR items to always be a string (#51) --- codegen/pyadritem.txt | 2 +- src/ansys/dynamicreporting/core/adr_service.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codegen/pyadritem.txt b/codegen/pyadritem.txt index 46279ade..82d5559d 100644 --- a/codegen/pyadritem.txt +++ b/codegen/pyadritem.txt @@ -88,7 +88,7 @@ class Item: self._url = None self.logger = service.logger self.source = source - self.obj_name = obj_name + self.obj_name = str(obj_name) self.type = None self.item_text = "" """Text (HTML and LaTeX formatting)""" diff --git a/src/ansys/dynamicreporting/core/adr_service.py b/src/ansys/dynamicreporting/core/adr_service.py index 016be055..e2895a17 100755 --- a/src/ansys/dynamicreporting/core/adr_service.py +++ b/src/ansys/dynamicreporting/core/adr_service.py @@ -717,7 +717,7 @@ def create_item( ret = adr_service.connect() my_img = adr_service.create_item() """ - a = Item(service=self, obj_name=obj_name, source=source) + a = Item(service=self, obj_name=str(obj_name), source=source) return a def query(self, query_type: str = "Item", filter: Optional[str] = "") -> list: