소스 검색

Format event handlers not in importable modules (#1875)

Nikhil Rao 1 년 전
부모
커밋
41872dfdc9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      reflex/utils/format.py

+ 1 - 1
reflex/utils/format.py

@@ -383,7 +383,7 @@ def get_event_handler_parts(handler: EventHandler) -> tuple[str, str]:
         state = vars(sys.modules[handler.fn.__module__])[state_name]
     except Exception:
         # If the state isn't in the module, just return the function name.
-        return ("", handler.fn.__qualname__)
+        return ("", to_snake_case(handler.fn.__qualname__))
 
     return (state.get_full_name(), name)