Skip to content

Commit c960cf7

Browse files
committed
clean up repeated helper method
This is now moved to the AppointmentMixin
1 parent 2ae30c2 commit c960cf7

File tree

3 files changed

+1
-19
lines changed

3 files changed

+1
-19
lines changed

manage_breast_screening/mammograms/views/breast_augmentation_history_view.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
from django.urls import reverse
33
from django.views.generic import FormView
44

5-
from ..forms.breast_augmentation_history_form import (
6-
BreastAugmentationHistoryForm,
7-
)
5+
from ..forms.breast_augmentation_history_form import BreastAugmentationHistoryForm
86
from .mixins import InProgressAppointmentMixin
97

108

manage_breast_screening/mammograms/views/implanted_medical_device_history_view.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from functools import cached_property
2-
31
from django.contrib import messages
42
from django.urls import reverse
53
from django.views.generic import FormView
@@ -55,10 +53,6 @@ def get_context_data(self, **kwargs):
5553

5654
return context
5755

58-
@cached_property
59-
def participant(self):
60-
return self.appointment.participant
61-
6256
def get_form_kwargs(self):
6357
kwargs = super().get_form_kwargs()
6458
kwargs["participant"] = self.participant

manage_breast_screening/mammograms/views/special_appointment_views.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from functools import cached_property
2-
31
from django.shortcuts import redirect
42
from django.urls import reverse
53
from django.views.generic import FormView
@@ -21,10 +19,6 @@ class ProvideSpecialAppointmentDetails(AppointmentMixin, FormView):
2119
"mammograms/special_appointments/provide_special_appointment_details.jinja"
2220
)
2321

24-
@cached_property
25-
def participant(self):
26-
return self.appointment.participant
27-
2822
def get_context_data(self, **kwargs):
2923
context = super().get_context_data()
3024

@@ -76,10 +70,6 @@ class MarkReasonsTemporary(AppointmentMixin, FormView):
7670
form_class = MarkReasonsTemporaryForm
7771
template_name = "mammograms/special_appointments/mark_reasons_temporary.jinja"
7872

79-
@cached_property
80-
def participant(self):
81-
return self.appointment.participant
82-
8373
def get_context_data(self, **kwargs):
8474
context = super().get_context_data()
8575

0 commit comments

Comments
 (0)