From 86d38a57cf8c3b3dd452f9f7863b007e10901cda Mon Sep 17 00:00:00 2001
From: Elke Kreim <elke.kreim@hs-hannover.de>
Date: Wed, 13 Feb 2019 15:56:11 +0100
Subject: [PATCH] Fix buildassets for project without assets directory

---
 hshassets/utils.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hshassets/utils.py b/hshassets/utils.py
index 5d114bb3..96e4e096 100644
--- a/hshassets/utils.py
+++ b/hshassets/utils.py
@@ -253,7 +253,7 @@ def build_css_from_scss(app_name):
     sass_source = get_init_scss_path(app_name)
 
     # if no path to a sass file exists in projekt take the default sass file of 'hshassets'
-    if not os.path.isfile(sass_source) and app_name is get_projectname():
+    if not os.path.isfile(sass_source) and app_name == get_projectname():
         sass_source = get_default_scss_path()
 
     if os.path.isfile(sass_source):
@@ -435,8 +435,9 @@ def build_assets():
     # PROJECT
     project_name = get_projectname()
     apps = get_installed_apps_with_asset_directory(include_project=True)
+
     if project_name not in apps:
-        apps.append(project_name)
+        build_app_css_from_scss(project_name)
 
     for app_name in apps:
         copy_assets_dirs_to_static(app_name)
-- 
GitLab