Work on event session, presentation, and presenter

This commit is contained in:
Scott Idem
2022-09-21 18:46:19 -04:00
parent 7fe007a098
commit ed7e06b5b2
5 changed files with 19 additions and 16 deletions

View File

@@ -208,7 +208,7 @@ async def upload_files(
log.debug(locals())
# NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING
time.sleep(2.5) # NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING
# time.sleep(2.5) # NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING
# NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING NOTE: WARNING
account_id_random = account_id # This is for the account random str ID
@@ -346,17 +346,20 @@ async def upload_files(
hosted_file_list.append(hosted_file_dict)
# NOTE: Currently sql_insert does not handle all successful inserts correctly. If there is not an autonum ID then it will return 0 as the ID.
if create_hosted_file_link(
account_id = account_id,
hosted_file_id = hosted_file_id,
link_to_type = link_to_type,
link_to_id = link_to_id,
): pass # This if statement should be improved
if link_to_type in ['event', 'event_location', 'event_session', 'event_presentation', 'event_presenter', 'event_badge', 'event_exhibit', 'event_person']:
log.info('File is for event module. Trigger will create the hosted_file_link record.')
else:
# This if statement should be improved
log.debug('Because the hosted_file_link table does not have a primary autonum this check is incorrect even when successful.')
log.debug('Something may have gone wrong while trying to create the hosted_file_link record.')
log.debug('The hosted_file_link was probably created fine though.')
if create_hosted_file_link(
account_id = account_id,
hosted_file_id = hosted_file_id,
link_to_type = link_to_type,
link_to_id = link_to_id,
): pass # This if statement should be improved
else:
# This if statement should be improved
log.debug('Because the hosted_file_link table does not have a primary autonum this check is incorrect even when successful.')
log.debug('Something may have gone wrong while trying to create the hosted_file_link record.')
log.debug('The hosted_file_link was probably created fine though.')
log.debug(hosted_file_list)
return mk_resp(data=hosted_file_list, response=response)