mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-18 16:02:10 +00:00
fix(frontend): fix newly deployed apps with frontend scripts
This commit is contained in:
@@ -0,0 +1 @@
|
||||
-- Add down migration script here
|
||||
@@ -0,0 +1,2 @@
|
||||
-- Add up migration script here
|
||||
delete from app_version_lite;
|
||||
@@ -1243,6 +1243,13 @@ async fn reduce_app(db: &sqlx::Pool<sqlx::Postgres>, value: &mut Value, app: i64
|
||||
match value {
|
||||
Value::Object(object) => {
|
||||
if let Some(Value::Object(script)) = object.get_mut("inlineScript") {
|
||||
if script
|
||||
.get("language")
|
||||
.and_then(|x| x.as_str())
|
||||
.is_some_and(|x| x == "frontend")
|
||||
{
|
||||
return Ok(());
|
||||
}
|
||||
// replace `content` with an empty string:
|
||||
let Some(Value::String(code)) = script.get_mut("content").map(std::mem::take)
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user