From 53b99da4e443fe1293a69f8bd47036af78edb37b Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Fri, 15 Nov 2024 11:30:06 +0100 Subject: [PATCH] REFACTOR: Fields init arg name The error would probably not have appeared if the __iniy__ method of Fields had "post_app" as input argument instead of "app". I assume this led to the confusion with providing an AEDT app such as Hfss, ... --- src/ansys/aedt/core/visualization/report/field.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ansys/aedt/core/visualization/report/field.py b/src/ansys/aedt/core/visualization/report/field.py index 5d0813a61bf..441a37a9c7d 100644 --- a/src/ansys/aedt/core/visualization/report/field.py +++ b/src/ansys/aedt/core/visualization/report/field.py @@ -67,10 +67,13 @@ def _context(self): class Fields(CommonReport): - """Provides for managing fields.""" + """Handler to manage fields.""" - def __init__(self, app, report_category, setup_name, expressions=None): - CommonReport.__init__(self, app, report_category, setup_name, expressions) + @pyaedt_function_handler( + app="post_app", + ) + def __init__(self, post_app, report_category, setup_name, expressions=None): + CommonReport.__init__(self, post_app, report_category, setup_name, expressions) self.domain = "Sweep" self.primary_sweep = "Distance"