lookup service tests passing, but I need to revist this.

This commit is contained in:
Dan 2022-02-09 12:11:51 -05:00
parent de6d7eee84
commit e9fd76ed99
2 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,8 @@ class LookupService(object):
if lookup_model.is_ldap: # LDAP is always current
is_current = True
else:
current_date = SpecFileService.last_modified(workflow.workflow_spec, lookup_model.file_name)
workflow_spec = WorkflowSpecService().get_spec(workflow.workflow_spec_id)
current_date = SpecFileService.last_modified(workflow_spec, lookup_model.file_name)
is_current = current_date == lookup_model.last_updated
if not is_current:

View File

@ -49,8 +49,7 @@ class TestLookupService(BaseTest):
file_path = os.path.join(app.root_path, '..', 'tests', 'data',
'enum_options_with_search', 'sponsors_modified.xlsx')
file = open(file_path, 'rb')
workflow_spec_model = session.query(WorkflowSpecModel)\
.filter(WorkflowSpecModel.id == workflow.workflow_spec_id).first()
workflow_spec_model = self.workflow_spec_service.get_spec(workflow.workflow_spec_id)
SpecFileService().update_file(workflow_spec_model, "sponsors.xlsx", file.read())
file.close()