feat: add application name filter to version query
This commit is contained in:
		@@ -55,7 +55,8 @@ def upload(application_name: str):
 | 
				
			|||||||
        return {"error": "Invalid form data. There is no file or version field"}, 400
 | 
					        return {"error": "Invalid form data. There is no file or version field"}, 400
 | 
				
			||||||
    version = version.strip()
 | 
					    version = version.strip()
 | 
				
			||||||
    application = (database.Application.query.
 | 
					    application = (database.Application.query.
 | 
				
			||||||
                   filter_by(version=version).
 | 
					                   filter_by(version=version,
 | 
				
			||||||
 | 
					                             name=application_name).
 | 
				
			||||||
                   with_entities(database.Application.id).first())
 | 
					                   with_entities(database.Application.id).first())
 | 
				
			||||||
    if application:
 | 
					    if application:
 | 
				
			||||||
        return {"error": f"Specified version ({version}) already uploaded"}, 400
 | 
					        return {"error": f"Specified version ({version}) already uploaded"}, 400
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user