Closed luisapuppin closed 6 years ago
No console do javascript havia a seguinte mensagem:
VM383:1674 Mixed Content: The page at 'https://riscos.herokuapp.com/riscos/monitoramento/' was loaded over a secure connection, but contains a form that targets an insecure endpoint 'http://dpaste.com/'. This endpoint should be made available over a secure connection.
O bug ocorria devido a erro de comunicação entre a base de dados cadastrada anteriormente (Tabela de Tratamentos) e a tabela de Monitoramento incluída pelo PR #49. Para facilitar o contorno de futuros erros de base, o arquivo create_db.py foi atualizado com os dados existentes na base até agora. Erro dado como solucionado pelo commit 0595cb2714fdc47b7073b856e420e4fb2c73b7cf.
Environment:
Request Method: GET Request URL: https://riscos.herokuapp.com/riscos/monitoramento/
Django Version: 2.0.4 Python Version: 3.6.4 Installed Applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'riscos'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute
The above exception (relation "riscos_monitoramento" does not exist LINE 1: ...dastro", "riscos_monitoramento"."ds_usuario" FROM "riscos_mo... ^ ) was the direct cause of the following exception:
File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
File "/app/.heroku/python/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
File "/app/riscos/views.py" in fazer_monitoramento
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/query.py" in iter
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/query.py" in _fetch_all
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/query.py" in iter
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/sql/compiler.py" in execute_sql
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py" in execute
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute_with_wrappers
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/utils.py" in exit
File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py" in _execute
Exception Type: ProgrammingError at /riscos/monitoramento/ Exception Value: relation "riscos_monitoramento" does not exist LINE 1: ...dastro", "riscos_monitoramento"."ds_usuario" FROM "riscos_mo... ^