diff --git a/standards/templates/standards/standards_management.html b/standards/templates/standards/standards_management.html index 737002f..3c288c5 100644 --- a/standards/templates/standards/standards_management.html +++ b/standards/templates/standards/standards_management.html @@ -77,6 +77,7 @@
diff --git a/users/__pycache__/views.cpython-38.pyc b/users/__pycache__/views.cpython-38.pyc index 90bd670..2a596ca 100644 Binary files a/users/__pycache__/views.cpython-38.pyc and b/users/__pycache__/views.cpython-38.pyc differ diff --git a/users/views.py b/users/views.py index f51c881..5875ff7 100644 --- a/users/views.py +++ b/users/views.py @@ -428,11 +428,13 @@ def support(request): json_data = json.dumps(ostdata) - r = requests.post("https://support.vh-solutions.de/api/http.php/tickets.json", data=json_data, headers=headers) - if(r != 201): - messages.warning(request, f'Supportanfrage fehlgeschlagen!') + r = requests.post("https://support.vh-solutions.de/api/http.php/tickets.json", data=json_data, headers=headers) + + if(r.status_code != 201): + messages.warning(request, f'Supportanfrage fehlgeschlagen!') else: - messages.warning(request, f'Supportanfrage gesendet. Ticket-ID: ' + str(r)) + messages.success(request, f'Supportanfrage erfolgreich! Ihre Ticketnummer ist '+ r.json() +'!') + return render(request, 'users/support_done.html', context) else: