Make sure we get the file we intended

This commit is contained in:
Kelly McDonald 2020-12-07 08:50:20 -05:00
parent f26a8615a4
commit 44c72115ae
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ def update_file_data(file_id):
def get_file_data_by_hash(md5_hash):
filedatamodel = session.query(FileDataModel).filter(FileDataModel.md5_hash == md5_hash).first()
return get_file_data(filedatamodel.file_model_id)
return get_file_data(filedatamodel.file_model_id,version=filedatamodel.version)
def get_file_data(file_id, version=None):
file_data = FileService.get_file_data(file_id, version)