diff --git a/src/app/form/form-view/form-view.component.ts b/src/app/form/form-view/form-view.component.ts index e7e262de277710613085d97a3cd2daac2e95cdc1..3e5f7aceafe15320f035f5dd4b9b596a5ed53855 100644 --- a/src/app/form/form-view/form-view.component.ts +++ b/src/app/form/form-view/form-view.component.ts @@ -97,9 +97,6 @@ export class FormViewComponent implements OnInit { if (this.profile.structuresLink.length) { // if register a new user as a new member structure, no structure to choose this.isRegisterNewMember = true; - this.structureService.getStructure(this.profile.structuresLink[0]).subscribe((structure) => { - this.structure = new Structure(structure); - }); } } }); @@ -340,7 +337,10 @@ export class FormViewComponent implements OnInit { // if register a new user as a new member structure, no structure to choose if (this.isRegisterNewMember) { if (this.profile.job && this.profile.job.hasPersonalOffer) { - this.router.navigateByUrl('form/personaloffer'); + this.structureService.getStructure(this.profile.structuresLink[0]).subscribe((structure) => { + this.structure = new Structure(structure); + this.router.navigateByUrl('form/personaloffer'); + }); } else { this.router.navigateByUrl('/profile'); }