Working on all the routes, methods, and models.
This commit is contained in:
@@ -721,11 +721,11 @@ def redis_lookup_id_random(record_id_random:int|str, table_name:str):
|
||||
r.setex(key_name, datetime.timedelta(minutes=90), value=record_id)
|
||||
return int(record_id)
|
||||
else:
|
||||
log.setLevel(logging.ERROR) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
# log.setLevel(logging.ERROR) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.error('The SQL result was not what was expected.')
|
||||
return False
|
||||
else:
|
||||
log.setLevel(logging.ERROR) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
# log.setLevel(logging.ERROR) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.error('More than one record may have been found. There may be a duplicate id_random.')
|
||||
log.error(select_results)
|
||||
return False
|
||||
@@ -734,7 +734,7 @@ def redis_lookup_id_random(record_id_random:int|str, table_name:str):
|
||||
log.info('Record ID random was not found')
|
||||
return None
|
||||
|
||||
log.setLevel(logging.ERROR) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
# log.setLevel(logging.ERROR) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.error('We should not be here. Something unexpected happened.')
|
||||
return False # Just in case
|
||||
# ### END ### API Lib General ### redis_lookup_id_random() ###
|
||||
|
||||
Reference in New Issue
Block a user