bug
This commit is contained in:
		
							
								
								
									
										6
									
								
								app.py
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								app.py
									
									
									
									
									
								
							@@ -157,12 +157,12 @@ def get_image():
 | 
				
			|||||||
@app.route("/api/release_allocation", methods=['POST'])
 | 
					@app.route("/api/release_allocation", methods=['POST'])
 | 
				
			||||||
def release_allocation():
 | 
					def release_allocation():
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        name = db.get_conf_image(request.headers['name'])
 | 
					        id_allocation = db.get_conf_id_name(request.headers['name'])
 | 
				
			||||||
        if name is None or name == "":
 | 
					        if id_allocation is None or id_allocation == "":
 | 
				
			||||||
            return jsonify(message="400")
 | 
					            return jsonify(message="400")
 | 
				
			||||||
    except:
 | 
					    except:
 | 
				
			||||||
        pass
 | 
					        pass
 | 
				
			||||||
    id_allocation = db.get_conf_id_name(name)
 | 
					    
 | 
				
			||||||
    if id_allocation is not None:
 | 
					    if id_allocation is not None:
 | 
				
			||||||
        db.del_image_allocation_id(id_allocation)
 | 
					        db.del_image_allocation_id(id_allocation)
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user