kizniche / Mycodo

An environmental monitoring and regulation system
http://kylegabriel.com/projects/
GNU General Public License v3.0
2.89k stars 488 forks source link

Py code does not saving if "Analyze Python with Pylint" is unchecked #1291

Closed wingsergey closed 1 year ago

wingsergey commented 1 year ago

Describe the problem/bug

If uncheck 'Analyze Python with Pylint' flag during saving of Conditional Functions code under Run Python Code section is not applied in controller.

Versions:

Additional context

In daemon logs I also can see old code in debug message

kizniche commented 1 year ago

What version? Have you upgraded to master to confirm the unreleased version hasn't fixed this?

wingsergey commented 1 year ago

Sorry, fixed version to Mycodo Version: 8.15.7 I can not deploy from master to prod to check.

kizniche commented 1 year ago

I see the issue at https://github.com/kizniche/Mycodo/blob/e76dbd7b4d65174e2ec12615943bcd2efaceca02/mycodo/mycodo_flask/utils/utils_conditional.py#L40

Thanks for the bug report. I'll commit a fix soon.

kizniche commented 1 year ago

Upon further inspection, it is saving the code, it's just not providing an output.