Merge branch 'feature/spec_files_wthout_db' of https://github.com/sartography/cr-connect-workflow into feature/spec_files_wthout_db

This commit is contained in:
mike cullerton 2022-02-09 12:14:57 -05:00
commit 881ee78e68
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 if lookup_model.is_ldap: # LDAP is always current
is_current = True is_current = True
else: 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 is_current = current_date == lookup_model.last_updated
if not is_current: if not is_current:

View File

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