Browse Source

Merge pull request #321 from dsbegnoche/patch-5

No error message for Schedule Error
pull/322/head
Sebastian Stehle 7 years ago
committed by GitHub
parent
commit
8602873260
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/Squidex/app/shared/state/contents.state.ts

7
src/Squidex/app/shared/state/contents.state.ts

@ -12,6 +12,7 @@ import { catchError, distinctUntilChanged, map, switchMap, tap } from 'rxjs/oper
import {
DateTime,
DialogService,
ErrorDto,
ImmutableArray,
notify,
Pager,
@ -152,7 +153,7 @@ export abstract class ContentsStateBase extends State<Snapshot> {
this.contentsService.changeContentStatus(this.appName, this.schemaName, c.id, action, dueTime, c.version).pipe(
catchError(error => of(error))))).pipe(
tap(results => {
const error = results.find(x => !!x.error);
const error = results.find(x => x instanceof ErrorDto);
if (error) {
this.dialogs.notifyError(error);
@ -169,7 +170,7 @@ export abstract class ContentsStateBase extends State<Snapshot> {
this.contentsService.deleteContent(this.appName, this.schemaName, c.id, c.version).pipe(
catchError(error => of(error))))).pipe(
tap(results => {
const error = results.find(x => !!x.error);
const error = results.find(x => x instanceof ErrorDto);
if (error) {
this.dialogs.notifyError(error);
@ -389,4 +390,4 @@ const discardChanges = (content: ContentDto, user: string, version: Version, now
lastModified: now || DateTime.now(),
lastModifiedBy: user,
version
});
});

Loading…
Cancel
Save