]> wagnertech.de Git - SVBaL.git/blobdiff - python/eh_util/eh_app/AWK/routines.py
commit bevor kassenschreiben merge
[SVBaL.git] / python / eh_util / eh_app / AWK / routines.py
index 52509b70106b2b726c41078058e54a93801af969..3909448f96ad0f6ac0683f4c86aa7a6dc916b737 100644 (file)
@@ -8,19 +8,20 @@ def handle_uploaded_file(csv_file):
         for chunk in csv_file.chunks():
             destination.write(chunk)
 '''
-def aktualisiere_config(config, data):
-    if data["briefpapier"]:
-        uploaded_file = data["briefpapier"]
+def aktualisiere_config(config, data, file):
+
+    if file:
+        uploaded_file = file.name
         data_path = config.requireConfig("data_path")
         # copy briefpapier into data_path
-        with open(os.path.join(data_path, uploaded_file.name), 'wb+') as destination:
-            for chunk in uploaded_file.chunks():
+        with open(os.path.join(data_path, uploaded_file), 'wb+') as destination:
+            for chunk in file.chunks():
                 destination.write(chunk)
-        config.setConfig("briefpapier", uploaded_file.name)
-    
+        config.setConfig("briefpapier", uploaded_file)
+
     if data["basisbeitrag"]:
         config.setConfig("beitrag_basis", data["basisbeitrag"])
-        
+
     if data["zusatzbeitrag"]:
         config.setConfig("beitrag_zusatz", data["zusatzbeitrag"])