From 8c5ca13ec15bb53e8d8d99000959e6db49507d93 Mon Sep 17 00:00:00 2001
From: reverend <reverend@reverend2048.de>
Date: Sun, 21 Apr 2019 13:37:04 +0200
Subject: [PATCH] -pygame frontend artefacts

---
 src/views/__init__.py   | 3 ---
 src/views/management.py | 5 ++---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/views/__init__.py b/src/views/__init__.py
index 7230985..d9945ae 100644
--- a/src/views/__init__.py
+++ b/src/views/__init__.py
@@ -77,8 +77,5 @@ def build_current_round_json(game=None, path="frontend/current_round.json"):
 
     SOCKET.emit("round", json.dumps(round_json))
 
-    with open(path, "w") as file:
-        json.dump(round_json, file, indent=4)
-
 from views.management import mgmt
 from views.game import game
\ No newline at end of file
diff --git a/src/views/management.py b/src/views/management.py
index f062f05..0618087 100644
--- a/src/views/management.py
+++ b/src/views/management.py
@@ -67,11 +67,10 @@ def import_questin():
 def create_team():
     teamname = request.form.get("teamname")
     custom_teamlogo_path = _generate_teamlogo_path(teamname + ".png")
-    print(custom_teamlogo_path)
 
-    if "teamlogo" in request.files:
+    if "teamlogo" in request.files and request.files["teamlogo"].filename:
         teamlogo = request.files["teamlogo"]
-        path = _generate_teamlogo_path( teamlogo.filename)
+        path = _generate_teamlogo_path(teamlogo.filename)
         teamlogo.save(path)
         teamlogo = path
     elif os.path.exists(custom_teamlogo_path):
-- 
GitLab