Adaptations to allow for stand alone scripts.

This commit is contained in:
Landon Wark
2024-03-18 09:47:20 -05:00
parent 2fd8a0b9b6
commit e35081392e
7 changed files with 34 additions and 20 deletions

View File

@@ -469,11 +469,11 @@ class SubmissionFormWidget(QWidget):
Args:
fname (Path | None, optional): Input filename. Defaults to None.
"""
pyd = self.parse_form()
self.parse_form()
if isinstance(fname, bool) or fname == None:
fname = select_save_file(obj=self, default_name=pyd.construct_filename(), extension="csv")
fname = select_save_file(obj=self, default_name=self.pyd.construct_filename(), extension="csv")
try:
pyd.csv.to_csv(fname.__str__(), index=False)
self.pyd.csv.to_csv(fname.__str__(), index=False)
except PermissionError:
logger.debug(f"Could not get permissions to {fname}. Possibly the request was cancelled.")