Fixed DB entry creation
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		@@ -47,6 +47,12 @@ class CNNView(FlaskView):
 | 
			
		||||
        # create bucket if necessary
 | 
			
		||||
        ensure_buckets()
 | 
			
		||||
 | 
			
		||||
        # Create the entry in the db
 | 
			
		||||
        if info['id']:
 | 
			
		||||
            m = AIModel(id=info['id'], type=AIModelType.CNN)
 | 
			
		||||
        else:
 | 
			
		||||
            m = AIModel(type=AIModelType.CNN)
 | 
			
		||||
 | 
			
		||||
        # Put files into MinIO
 | 
			
		||||
        storage.connection.put_object(current_app.config['MINIO_CNN_BUCKET_NAME'], "model/" + str(m.id), model_file,
 | 
			
		||||
                                      model_file.content_length, content_type=model_file.content_type)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user