mirror of https://github.com/openspug/spug
				
				
				
			F 修复添加监控任务可能无法正常执行的问题
							parent
							
								
									c5fc903cce
								
							
						
					
					
						commit
						9693bb7e2c
					
				|  | @ -42,8 +42,9 @@ class DetectionView(View): | |||
|                     rds_cli = get_redis_connection() | ||||
|                     rds_cli.rpush(settings.MONITOR_KEY, json.dumps(form)) | ||||
|             else: | ||||
|                 Detection.objects.create(created_by=request.user, **form) | ||||
|                 dtt = Detection.objects.create(created_by=request.user, **form) | ||||
|                 form.action = 'add' | ||||
|                 form.id = dtt.id | ||||
|                 rds_cli = get_redis_connection() | ||||
|                 rds_cli.rpush(settings.MONITOR_KEY, json.dumps(form)) | ||||
|         return json_response(error=error) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 vapao
						vapao