diff --git a/src/features/need/need.service.ts b/src/features/need/need.service.ts index a760467bc..26d7d783f 100644 --- a/src/features/need/need.service.ts +++ b/src/features/need/need.service.ts @@ -249,6 +249,7 @@ export class NeedService { theAuditor: AllUserEntity, thePurchaser: AllUserEntity, needDetails: NeedParams, + theNestProvider: ProviderEntity, ): Promise { return this.needRepository.update(needId, { child: theChild, @@ -256,6 +257,7 @@ export class NeedService { auditor: theAuditor, purchaser: thePurchaser, ngo: theNgo, + provider: theNestProvider, ...needDetails, }); } diff --git a/src/features/sync/sync.service.ts b/src/features/sync/sync.service.ts index 60971c1ea..978655939 100644 --- a/src/features/sync/sync.service.ts +++ b/src/features/sync/sync.service.ts @@ -746,6 +746,7 @@ export class SyncService { nestAuditor, nestPurchaser, needDetails, + theNestProvider, ) .then(); nestNeed = await this.needService.getNeedByFlaskId(nestNeed.flaskId); @@ -762,10 +763,7 @@ export class SyncService { if (!nestNeed) { throw new ServerError('no need...', 504); } - console.log(theNestProvider); - console.log("--------------------------------"); - console.log(nestProviderNeedRelation); - + if (!nestNeed.provider || !nestNeed.provider.name) { throw new ServerError('no provider detected...', 505); }