Browse Source
			
			
			Bugfix/fix exception in portfolio details endpoint (#3896)
			
				* Fix exception caused by markets and marketsAdvanced
* Update changelog
			
			
				pull/3905/head
			
			
		 
		
			
				
					
						
						Thomas Kaul
					
					1 year ago
					
						
							committed by
							
								
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: B5690EEEBB952194
						
					
				
			
		
		
		
	
		
			
				 3 changed files with 
7 additions and 
3 deletions
			 
			
		 
		
			
				- 
					
					
					 
					CHANGELOG.md
				
 
			
				- 
					
					
					 
					apps/api/src/app/endpoints/public/public.controller.ts
				
 
			
				- 
					
					
					 
					apps/api/src/app/portfolio/portfolio.controller.ts
				
 
			
		
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					- Moved the tags from the info to the user service | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					- Switched the `prefer-const` rule from `warn` to `error` in the `eslint` configuration | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					### Fixed | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					- Fixed an exception in the portfolio details endpoint caused by a calculation of the allocations by market | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					## 2.113.0 - 2024-10-06 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					### Added | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -76,7 +76,7 @@ export class PublicController { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    ]); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    Object.values(markets).forEach((market) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    Object.values(markets ?? {}).forEach((market) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      delete market.valueInBaseCurrency; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  | 
				
			
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -172,10 +172,10 @@ export class PortfolioController { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }) || | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      isRestrictedView(this.request.user) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    ) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      Object.values(markets).forEach((market) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      Object.values(markets ?? {}).forEach((market) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        delete market.valueInBaseCurrency; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      Object.values(marketsAdvanced).forEach((market) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      Object.values(marketsAdvanced ?? {}).forEach((market) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        delete market.valueInBaseCurrency; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |