Skip to content
Snippets Groups Projects
Unverified Commit 73c5a96b authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Use can-save for models (#40586)

parent 20126473
Branches
Tags
No related merge requests found
......@@ -419,18 +419,18 @@ function DatasetEditor(props) {
);
const { isNative } = Lib.queryDisplayInfo(dataset.query());
const isEmpty = !isNative
? Lib.databaseID(dataset.query()) == null
: dataset.legacyQuery().isEmpty();
const canSaveChanges =
!isEmpty &&
isDirty &&
(!isNative || !isResultDirty) &&
fields.every(field => field.display_name);
fields.every(field => field.display_name) &&
Lib.canSave(dataset.query());
const saveButtonTooltipLabel =
!isEmpty && isDirty && isNative && isResultDirty
isDirty &&
isNative &&
isResultDirty &&
Lib.rawNativeQuery(dataset.query()).length > 0
? t`You must run the query before you can save this model`
: undefined;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment