Working on Cvent API for IDAA members. Adding and updating a person along with membership info now works. Updating the membership status for person and user tables now works.

This commit is contained in:
Scott Idem
2022-02-01 19:32:10 -05:00
parent fe3cea131a
commit 217530fb93
8 changed files with 247 additions and 42 deletions

View File

@@ -285,8 +285,8 @@ def sql_update(
else:
log.debug(result_update)
log.debug(f'rowcount = {result_update.rowcount}; lastrowid = {result_update.lastrowid}')
if result_update.rowcount == 1 and result_update.lastrowid == 0: # update with no change
log.info('Update record (with no change???)') # With SQL UPDATE this record may have actually changed
if result_update.rowcount >= 1 and result_update.lastrowid == 0: # update with no change
log.info(f'Updated {result_update.rowcount} records (with no changes?)') # With SQL UPDATE this record may have actually changed
return True
elif result_update.rowcount == 2 and result_update.lastrowid > 0: # update with change
log.warning('Should we be here???')
@@ -625,11 +625,10 @@ def sql_select(
return False # Not successful
else:
log.info('Successfully executed the SQL on the first try.')
log.debug('Successfully executed the SQL on the first try.')
pass
#log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.info(f'Row count: {result.rowcount}')
log.debug(f'Row count: {result.rowcount}')
#log.debug(vars(result))
#log.debug(dir(result))
if result.rowcount == 1: