Browse Source
			
			
			Feature/improve handling of activities without account (#3060)
			
				* Improve handling of activities without account
* Update changelog
			
			
				pull/3061/head
			
			
		 
		
			
				
					
						 Thomas Kaul
					
					2 years ago
						Thomas Kaul
					
					2 years ago
					
						
							committed by
							
								 GitHub
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: B5690EEEBB952194
						
					
				
			
		
		
		
	
		
			
				 2 changed files with 
7 additions and 
1 deletions
			 
			
		 
		
			
				- 
					
					
					 
					CHANGELOG.md
				
- 
					
					
					 
					apps/api/src/app/portfolio/portfolio.service.ts
				
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | ## Unreleased |  |  | ## Unreleased | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  | ### Changed | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  | - Improved the handling of activities without account | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | ### Fixed |  |  | ### Fixed | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | - Fixed the query to filter activities of excluded accounts |  |  | - Fixed the query to filter activities of excluded accounts | 
			
		
	
	
		
		
			
				
					|  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -749,7 +749,9 @@ export class PortfolioService { | 
			
		
	
		
		
			
				
					|  |  |       } = position; |  |  |       } = position; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |       const accounts: PortfolioPositionDetail['accounts'] = uniqBy( |  |  |       const accounts: PortfolioPositionDetail['accounts'] = uniqBy( | 
			
		
	
		
		
			
				
					
					|  |  |         orders, |  |  |         orders.filter(({ Account }) => { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |           return Account; | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         }), | 
			
		
	
		
		
			
				
					|  |  |         'Account.id' |  |  |         'Account.id' | 
			
		
	
		
		
			
				
					|  |  |       ).map(({ Account }) => { |  |  |       ).map(({ Account }) => { | 
			
		
	
		
		
			
				
					|  |  |         return Account; |  |  |         return Account; | 
			
		
	
	
		
		
			
				
					|  | 
 |