Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pymodbus/server/simulator/http_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,10 @@ def build_html_calls(self, params: dict, html: str) -> str: # pragma: no cover
for function in DecodePDU(True).list_function_codes():
selected = (
"selected"
if function.function_code == self.call_monitor.function
if function == self.call_monitor.function
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong, it is a list of function codes, not object pointers.

else ""
)
function_codes += f"<option value={function.function_code} {selected}>function code name</option>"
function_codes += f"<option value={function} {selected}>function code name</option>"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong, you are now building a list of object pointers and not function codes !

simulation_action = (
"ACTIVE" if self.call_response.active != RESPONSE_INACTIVE else ""
)
Expand Down