From 8cd6615b7c4fc35188a85fd43b27eac98eac67aa Mon Sep 17 00:00:00 2001 From: gkolokythas Date: Tue, 4 Jun 2019 10:36:39 +0300 Subject: [PATCH] Fixes bug on sending unnecessary requests on dashboard. --- dmp-frontend/src/app/ui/dashboard/dashboard.component.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts b/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts index ea3ac35ff..7caddc372 100644 --- a/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts +++ b/dmp-frontend/src/app/ui/dashboard/dashboard.component.ts @@ -99,6 +99,8 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC //let data = results['payload']; this.dashboardStatisticsData = results; }); + this.getPublicDmps(); + this.getPublicDatasets(); } else { this.dashboardService.getUserStatistics() .pipe(takeUntil(this._destroyed)) @@ -110,9 +112,6 @@ export class DashboardComponent extends BaseComponent implements OnInit, IBreadC this.filteredOptions = this.searchControl.valueChanges.flatMap(x => { return this.searchBarService.search(x); }); - - this.getPublicDmps(); - this.getPublicDatasets(); } public isAuthenticated(): boolean {