Test fixes

This commit is contained in:
2020-09-12 10:08:47 +01:00
parent ba6dbc6980
commit cf7ada3d9e
5 changed files with 23 additions and 22 deletions

View File

@@ -174,7 +174,7 @@ class Command(BaseCommand):
"add_person", "change_person", "view_person", "view_profile",
"add_venue", "change_venue", "view_venue",
"add_asset", "change_asset", "delete_asset",
"asset_finance", "view_asset", "view_supplier", "asset_finance",
"view_asset", "view_supplier", "asset_finance",
"add_supplier", "view_cabletype", "change_cabletype",
"add_cabletype", "view_eventchecklist", "change_eventchecklist",
"add_eventchecklist", "view_riskassessment", "change_riskassessment",

View File

@@ -0,0 +1,21 @@
# Generated by Django 3.1 on 2020-09-12 08:03
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('RIGS', '0054_auto_20200831_1218'),
]
operations = [
migrations.AlterModelOptions(
name='eventchecklist',
options={'ordering': ['event'], 'permissions': [('review_eventchecklist', 'Can review Event Checklists')]},
),
migrations.AlterModelOptions(
name='riskassessment',
options={'ordering': ['event'], 'permissions': [('review_riskassessment', 'Can review Risk Assessments')]},
),
]

View File

@@ -152,18 +152,6 @@ def profile_by_index(value):
return ""
@register.filter
def next(alist, current_index):
"""
Returns the next element of the list using the current index if it exists.
Otherwise returns an empty string.
"""
try:
return alist[int(current_index) + 1] # access the next element
except BaseException:
return '' # return empty string in case of exception
@register.filter(needs_autoescape=True)
def yesnoi(boolean, invert=False, autoescape=True):
value = title(yesno(boolean))

View File

@@ -716,7 +716,6 @@ class TestCalendar(BaseRigboardTest):
# Wow - that was a lot of tests
@screenshot_failure_cls
class ClientEventAuthorisationTest(TestCase):
auth_data = {
'name': 'Test ABC',