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)