Browse Source
			
			
			Bugfix/fix missing symbol profile data connection in import (#630)
			
				* Fix missing symbol profile data connection in import
* Update changelog
			
			
				pull/631/head
			
			
		 
		
			
				
					
						 Thomas Kaul
					
					4 years ago
						Thomas Kaul
					
					4 years ago
					
						
							committed by
							
								 GitHub
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: 4AEE18F83AFDEB23
						
					
				
			
		
		
		
	
		
			
				 3 changed files with 
25 additions and 
10 deletions
			 
			
		 
		
			
				- 
					
					
					 
					CHANGELOG.md
				
- 
					
					
					 
					apps/api/src/app/import/import.service.ts
				
- 
					
					
					 
					apps/api/src/app/order/order.controller.ts
				
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | 
			
		
	
		
		
			
				
					|  |  | ### Fixed |  |  | ### Fixed | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | - Fixed the fallback to load currencies directly from the data provider |  |  | - Fixed the fallback to load currencies directly from the data provider | 
			
		
	
		
		
			
				
					|  |  |  |  |  | - Fixed the missing symbol profile data connection in the import functionality for activities | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | ## 1.103.0 - 13.01.2022 |  |  | ## 1.103.0 - 13.01.2022 | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -34,11 +34,6 @@ export class ImportService { | 
			
		
	
		
		
			
				
					|  |  |       unitPrice |  |  |       unitPrice | 
			
		
	
		
		
			
				
					|  |  |     } of orders) { |  |  |     } of orders) { | 
			
		
	
		
		
			
				
					|  |  |       await this.orderService.createOrder({ |  |  |       await this.orderService.createOrder({ | 
			
		
	
		
		
			
				
					|  |  |         Account: { |  |  |  | 
			
		
	
		
		
			
				
					|  |  |           connect: { |  |  |  | 
			
		
	
		
		
			
				
					|  |  |             id_userId: { userId, id: accountId } |  |  |  | 
			
		
	
		
		
			
				
					|  |  |           } |  |  |  | 
			
		
	
		
		
			
				
					|  |  |         }, |  |  |  | 
			
		
	
		
		
			
				
					|  |  |         currency, |  |  |         currency, | 
			
		
	
		
		
			
				
					|  |  |         dataSource, |  |  |         dataSource, | 
			
		
	
		
		
			
				
					|  |  |         fee, |  |  |         fee, | 
			
		
	
	
		
		
			
				
					|  | @ -46,7 +41,26 @@ export class ImportService { | 
			
		
	
		
		
			
				
					|  |  |         symbol, |  |  |         symbol, | 
			
		
	
		
		
			
				
					|  |  |         type, |  |  |         type, | 
			
		
	
		
		
			
				
					|  |  |         unitPrice, |  |  |         unitPrice, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         Account: { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           connect: { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             id_userId: { userId, id: accountId } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         }, | 
			
		
	
		
		
			
				
					|  |  |         date: parseISO(<string>(<unknown>date)), |  |  |         date: parseISO(<string>(<unknown>date)), | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         SymbolProfile: { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           connectOrCreate: { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             create: { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |               dataSource, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |               symbol | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             }, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             where: { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |               dataSource_symbol: { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 dataSource, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 symbol | 
			
		
	
		
		
			
				
					|  |  |  |  |  |               } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |           } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         }, | 
			
		
	
		
		
			
				
					|  |  |         User: { connect: { id: userId } } |  |  |         User: { connect: { id: userId } } | 
			
		
	
		
		
			
				
					|  |  |       }); |  |  |       }); | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
	
		
		
			
				
					|  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -116,25 +116,25 @@ export class OrderController { | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |     return this.orderService.createOrder({ |  |  |     return this.orderService.createOrder({ | 
			
		
	
		
		
			
				
					|  |  |       ...data, |  |  |       ...data, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |       date, | 
			
		
	
		
		
			
				
					|  |  |       Account: { |  |  |       Account: { | 
			
		
	
		
		
			
				
					|  |  |         connect: { |  |  |         connect: { | 
			
		
	
		
		
			
				
					|  |  |           id_userId: { id: accountId, userId: this.request.user.id } |  |  |           id_userId: { id: accountId, userId: this.request.user.id } | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					|  |  |       }, |  |  |       }, | 
			
		
	
		
		
			
				
					|  |  |       date, |  |  |  | 
			
		
	
		
		
			
				
					|  |  |       SymbolProfile: { |  |  |       SymbolProfile: { | 
			
		
	
		
		
			
				
					|  |  |         connectOrCreate: { |  |  |         connectOrCreate: { | 
			
		
	
		
		
			
				
					
					|  |  |           where: { |  |  |           create: { | 
			
				
				
			
		
	
		
		
			
				
					|  |  |             dataSource_symbol: { |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					|  |  |             dataSource: data.dataSource, |  |  |             dataSource: data.dataSource, | 
			
		
	
		
		
			
				
					|  |  |             symbol: data.symbol |  |  |             symbol: data.symbol | 
			
		
	
		
		
			
				
					|  |  |             } |  |  |  | 
			
		
	
		
		
			
				
					|  |  |           }, |  |  |           }, | 
			
		
	
		
		
			
				
					
					|  |  |           create: { |  |  |           where: { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |             dataSource_symbol: { | 
			
		
	
		
		
			
				
					|  |  |               dataSource: data.dataSource, |  |  |               dataSource: data.dataSource, | 
			
		
	
		
		
			
				
					|  |  |               symbol: data.symbol |  |  |               symbol: data.symbol | 
			
		
	
		
		
			
				
					|  |  |             } |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |           } |  |  |           } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					|  |  |       }, |  |  |       }, | 
			
		
	
		
		
			
				
					|  |  |       User: { connect: { id: this.request.user.id } } |  |  |       User: { connect: { id: this.request.user.id } } | 
			
		
	
		
		
			
				
					|  |  |     }); |  |  |     }); | 
			
		
	
	
		
		
			
				
					|  | 
 |