From 74bc1be643dc97f03e0cf6e88a9bd7672d31865a Mon Sep 17 00:00:00 2001 From: crunk Date: Sun, 29 Dec 2024 12:49:17 +0100 Subject: [PATCH] messy fixes of untyped languages --- verse/distribusikan/distribusi_selector.py | 11 +++-------- verse/distribusikan/distribusi_workflow.py | 4 +++- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/verse/distribusikan/distribusi_selector.py b/verse/distribusikan/distribusi_selector.py index 9c01c95..db24601 100644 --- a/verse/distribusikan/distribusi_selector.py +++ b/verse/distribusikan/distribusi_selector.py @@ -109,14 +109,9 @@ def _delete_distribusi_files(distribusiname): cssfolder = os.path.join("themes/userthemes", distribusiname) if os.path.exists(cssfolder): shutil.rmtree(cssfolder) - - distribusi = Distribusis.query.filter_by( - distribusiname=distribusiname - ).first() - if distribusi.publictheme is not None: - publicthemefolder = os.path.join("themes/publicthemes", distribusiname) - if os.path.exists(publicthemefolder): - shutil.rmtree(publicthemefolder) + publicthemefolder = os.path.join("themes/publicthemes", distribusiname) + if os.path.exists(publicthemefolder): + shutil.rmtree(publicthemefolder) def _delete_distribusi_database_files(distribusiname): diff --git a/verse/distribusikan/distribusi_workflow.py b/verse/distribusikan/distribusi_workflow.py index 03455bb..e031c06 100644 --- a/verse/distribusikan/distribusi_workflow.py +++ b/verse/distribusikan/distribusi_workflow.py @@ -94,8 +94,10 @@ def get_css_file(distribusi): def run_distribusi(userfolder, cssfile): + shutil.copy(cssfile, userfolder) + stash_css_file = os.path.join(userfolder, os.path.basename(cssfile)) APP.logger.info( - f"Run distribusi on this folder: {userfolder} with css:{cssfile}" + f"Run distribusi on this folder: {userfolder} with css:{stash_css_file}" ) distribusify(userfolder, cssfile)