diff --git a/RIGS/migrations/0040_auto_20200925_2141.py b/RIGS/migrations/0040_auto_20200925_2141.py
new file mode 100644
index 00000000..a3c0b3a4
--- /dev/null
+++ b/RIGS/migrations/0040_auto_20200925_2141.py
@@ -0,0 +1,23 @@
+# Generated by Django 3.1 on 2020-09-25 20:41
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('RIGS', '0039_auto_20200915_0937'),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name='eventchecklist',
+ name='medium_event',
+ ),
+ migrations.AddField(
+ model_name='eventchecklist',
+ name='event_size',
+ field=models.IntegerField(choices=[(0, 'Small'), (1, 'Medium'), (2, 'Large')], default=0),
+ preserve_default=False,
+ ),
+ ]
diff --git a/RIGS/models.py b/RIGS/models.py
index 4e4dff13..29da69b5 100644
--- a/RIGS/models.py
+++ b/RIGS/models.py
@@ -680,6 +680,10 @@ class RiskAssessment(models.Model, RevisionMixin):
@reversion.register(follow=['vehicles', 'crew'])
class EventChecklist(models.Model, RevisionMixin):
+ SMALL = (0, 'Small')
+ MEDIUM = (1, 'Medium')
+ LARGE = (2, 'Large')
+ SIZES = (SMALL, MEDIUM, LARGE)
event = models.OneToOneField('Event', on_delete=models.CASCADE)
# General
@@ -704,7 +708,7 @@ class EventChecklist(models.Model, RevisionMixin):
earthing = models.BooleanField(help_text="Equipment appropriately earthed?
(truss, stage, generators etc)")
pat = models.BooleanField(help_text="All equipment in PAT period?")
- medium_event = models.BooleanField()
+ event_size = models.IntegerField(choices=SIZES)
# Medium Electrical Checks
source_rcd = models.BooleanField(blank=True, null=True, help_text="Source RCD protected?
(if cable is more than 3m long) ")
labelling = models.BooleanField(blank=True, null=True, help_text="Appropriate and clear labelling on distribution and cabling?")
@@ -753,10 +757,10 @@ class EventChecklist(models.Model, RevisionMixin):
if self.earthing is None or self.pat is None:
errdict['earthing'] = 'Fill out the electrical checks'
- if not self.medium_event and (self.rcds is None or self.supply_test is None):
+ if self.event_size == 0 and (self.rcds is None or self.supply_test is None):
errdict['rcds'] = 'Fill out the small event electrical checks'
- if self.medium_event:
+ if self.event_size == 1:
if self.source_rcd is None or self.labelling is None or self.all_rcds_tested is None or self.public_sockets_tested is None:
errdict['source_rcd'] = 'Fill out the medium event electrical checks'
diff --git a/RIGS/templates/event_checklist_detail.html b/RIGS/templates/event_checklist_detail.html
index 900148db..46708e03 100644
--- a/RIGS/templates/event_checklist_detail.html
+++ b/RIGS/templates/event_checklist_detail.html
@@ -92,9 +92,15 @@
Outside the scope of this assessment. Carry on.
+