Post code clean-up, before attempt to upgrade controls to FigureWidgets

This commit is contained in:
lwark
2024-10-21 08:17:43 -05:00
parent 495d1a5a7f
commit 1f83b61c81
29 changed files with 441 additions and 1089 deletions

View File

@@ -153,7 +153,6 @@ def check_not_nan(cell_contents) -> bool:
try:
if cell_contents.lower() in exclude:
cell_contents = np.nan
# cell_contents = cell_contents.lower()
except (TypeError, AttributeError):
pass
try:
@@ -314,7 +313,7 @@ class Settings(BaseSettings, extra="allow"):
check = value.exists()
except AttributeError:
check = False
if not check: # and values.data['database_schema'] == "sqlite":
if not check:
# print(f"No directory found, using Documents/submissions")
value.mkdir(exist_ok=True)
# print(f"Final return of directory_path: {value}")
@@ -922,7 +921,6 @@ def check_authorization(func):
return func(*args, **kwargs)
else:
logger.error(f"User {getpass.getuser()} is not authorized for this function.")
# return dict(code=1, message="This user does not have permission for this function.", status="warning")
report = Report()
report.add_result(Result(owner=func.__str__(), code=1, msg="This user does not have permission for this function.", status="warning"))
return report