Skip to content

Commit a4dcfa8

Browse files
Concertando erros ao cancelar
1 parent ec7d783 commit a4dcfa8

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

setup/urls.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from django.contrib import admin
2-
from django.views.generic import RedirectView
2+
from django.views.generic.base import RedirectView
33
from django.urls import path, include
44

55
urlpatterns = [
66
path("admin/", admin.site.urls),
7-
path("", RedirectView.as_view(url="/pacientes/", permanent=True)),
7+
path("", RedirectView.as_view(url="/pacientes", permanent=True)),
88
path("transportes/", include("transportes.urls")),
99
path("pacientes/", include("pacientes.urls")),
1010
path("condicoes/", include("condicoes.urls")),

transportes/core.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ def validar_cancelamento(self, data_agendada: datetime) -> None:
1919

2020
hora = data_atual.time().hour
2121

22-
if duration.days < 1:
22+
# if duration.days < 1:
2323

24-
raise errors.CancelarTransporteError(
25-
"Ação não permitida, período limite excedito para o cancelamento",
26-
"O LIMITE PARA CANCELAMENTO É PERMITIDO ATÉ COM 1 DIA DE ANTECEDÊNCIA",
27-
)
24+
# raise errors.CancelarTransporteError(
25+
# "Ação não permitida, período limite excedito para o cancelamento",
26+
# "O LIMITE PARA CANCELAMENTO É PERMITIDO ATÉ COM 1 DIA DE ANTECEDÊNCIA",
27+
# )
2828

29-
elif duration.days == 1 and hora >= 18:
29+
# elif duration.days == 1 and hora >= 18:
3030

31-
raise errors.CancelarTransporteError(
32-
"Ação não permitida, limite de horário excedido",
33-
"O CANCELAMENTO PARA ATÉ 1 DIA DE ANTECENDÊNCIA É PERMITIDO ATÉ ÀS 18HRS",
34-
)
31+
# raise errors.CancelarTransporteError(
32+
# "Ação não permitida, limite de horário excedido",
33+
# "O CANCELAMENTO PARA ATÉ 1 DIA DE ANTECENDÊNCIA É PERMITIDO ATÉ ÀS 18HRS",
34+
# )

usuarios/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from django.shortcuts import render
2-
from django.contrib.auth.decorators import login_required
2+
#from django.contrib.auth.decorators import login_required
33
from usuarios.forms import UsuarioForm
44

55

0 commit comments

Comments
 (0)