fix: Cannot save Google Analytics integration. closes #6342

This commit is contained in:
Tom Moor
2024-01-02 18:07:50 -05:00
parent f2885a899b
commit 42563eee16

View File

@@ -132,7 +132,7 @@ export default abstract class Store<T extends Model> {
save(params: Properties<T>, options: JSONObject = {}): Promise<T> {
const { isNew, ...rest } = options;
if (isNew || !("id" in params)) {
if (isNew || !("id" in params) || !params.id) {
return this.create(params, rest);
}
return this.update(params, rest);