1
This commit is contained in:
@@ -86,12 +86,12 @@ def dispatch(request):
|
||||
state = request['state']
|
||||
if operation == 'refresh':
|
||||
return enrich(state)
|
||||
if not state['matches']:
|
||||
if not (state.get('approvedRecords') if operation == 'approved-ppt' else state.get('matches')):
|
||||
raise ValueError('至少完成一组核对后才能导出')
|
||||
destination = Path(request['destination'])
|
||||
temporary = destination.with_name('.' + str(uuid.uuid4()) + destination.suffix)
|
||||
try:
|
||||
if operation == 'ppt':
|
||||
if operation in ('ppt', 'approved-ppt'):
|
||||
export_ppt(state, temporary, request.get('classified', True))
|
||||
elif operation == 'travel':
|
||||
export_travel(state, temporary)
|
||||
|
||||
Reference in New Issue
Block a user