Skip to content
Snippets Groups Projects
Commit 29eec2e8 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

visit doesn't have type field

parent 728c48fa
No related branches found
No related tags found
1 merge request!1Appointments dev
......@@ -173,19 +173,6 @@ class Visit(models.Model):
verbose_name='Visit ends at'
) # Deadline before which all appointments need to be scheduled
TYPE_CHOICES_LEVEL_A_VISIT = 'A'
TYPE_CHOICES_LEVEL_B_VISIT = 'B'
TYPE_CHOICES_OTHER = 'O'
TYPE_CHOICES = (
(TYPE_CHOICES_LEVEL_A_VISIT, 'Level A visit'),
(TYPE_CHOICES_LEVEL_B_VISIT, 'Level B visit'),
(TYPE_CHOICES_OTHER, 'Other')
)
visit_type = models.CharField(max_length=1, choices=TYPE_CHOICES,
verbose_name='Visit type',
default='O'
)
is_finished = models.BooleanField(
verbose_name='Has ended',
default=False
......
......@@ -41,8 +41,7 @@
<th>Full information</th>
<th>Visit begins</th>
<th>Visit ends</th>
<th>Visit type</th>
<th>Finished?</th>
<th>Finished?</th>
</tr>
</thead>
<tbody>
......@@ -58,10 +57,7 @@
<td>
{{ visit.datetime_end }}
</td>
<td>
{{ visit.get_visit_type_display }}
</td>
<td>
<td>
{% if visit.is_finished %}<button type="button" class="btn btn-block btn-success">YES</button>
{% else %}<button type="button" class="btn btn-block btn-danger">NO</button>
{% endif %}
......
......@@ -16,7 +16,6 @@ class SubjectAddFormTests(TestCase):
self.sample_data = {'datetime_begin': "2017-01-01",
'datetime_end': "2017-02-02",
'visit_type': Visit.TYPE_CHOICES_OTHER,
'subject' : self.subject.id
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment