Browse Source

[REF-3220] Fix rx.cancel_upload EventSpec (#3608)

The formatting of the upload ID had extra single quotes that were not needed.
Now that `_var_name_unwrapped` is used, any `str`-like Vars will automatically
be formatted with backticks
Masen Furer 10 months ago
parent
commit
75c5fa2ffe
1 changed files with 1 additions and 1 deletions
  1. 1 1
      reflex/components/core/upload.py

+ 1 - 1
reflex/components/core/upload.py

@@ -107,7 +107,7 @@ def cancel_upload(upload_id: str) -> EventSpec:
         An event spec that cancels the upload when triggered.
     """
     return call_script(
-        f"upload_controllers[{Var.create_safe(upload_id, _var_is_string=True)._var_name_unwrapped!r}]?.abort()"
+        f"upload_controllers[{Var.create_safe(upload_id, _var_is_string=True)._var_name_unwrapped}]?.abort()"
     )