Fix empty assets array showing up in diff (#8017)
This commit is contained in:
@@ -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")]
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user