mirror of https://github.com/jumpserver/jumpserver
				
				
				
			perf: 优化 protocols
							parent
							
								
									59d9572d07
								
							
						
					
					
						commit
						aca0d62feb
					
				|  | @ -131,7 +131,6 @@ class PlatformSerializer(WritableNestedModelSerializer): | |||
|         primary = [p for p in protocols if p.get('primary')] | ||||
|         if not primary: | ||||
|             protocols[0]['primary'] = True | ||||
|             protocols[0]['default'] = False | ||||
|         # 这里不设置不行,write_nested 不使用 validated 中的 | ||||
|         self.initial_data['protocols'] = protocols | ||||
|         return protocols | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 ibuler
						ibuler