Fix empty assets array showing up in diff (#8017)

This commit is contained in:
Diego Imbert
2026-02-19 14:42:16 +01:00
committed by GitHub
parent d034eb00b8
commit 486b9f6f21
2 changed files with 9 additions and 7 deletions

View File

@@ -40,6 +40,7 @@ pub struct AssetWithAltAccessType {
pub path: String,
pub kind: AssetKind,
pub access_type: Option<AssetUsageAccessType>,
#[serde(skip_serializing_if = "Option::is_none")]
pub alt_access_type: Option<AssetUsageAccessType>,
/// Map of column name to access type for column-level access tracking
#[serde(skip_serializing_if = "Option::is_none")]

View File

@@ -773,15 +773,16 @@
triggersState.getDraftTriggersSnapshot()
)
const deployed = deployedValue ?? savedScript
const current = { ...script, draft_triggers: currentDraftTriggers }
if (current.assets && !current.assets.length) delete current.assets
diffDrawer?.openDrawer()
diffDrawer?.setDiff({
mode: 'normal',
deployed: deployedValue ?? savedScript,
deployed,
draft: savedScript['draft'],
current: {
...script,
draft_triggers: currentDraftTriggers
}
current
})
}
}
@@ -1443,8 +1444,8 @@
{#if script.dedicated_worker}
<div class="py-2">
<Alert type="info" title="Require dedicated workers">
A worker group needs to be configured to listen to this script. Select
it in the dedicated workers section of the worker group configuration.
A worker group needs to be configured to listen to this script. Select it
in the dedicated workers section of the worker group configuration.
</Alert>
</div>
{/if}