Commit ba58dec5 authored by Dennis Appel's avatar Dennis Appel

Revert change on wiki references in checklist

parent 97dab1b5
# Generated by Django 2.1.3 on 2018-12-17 17:33
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('wiki', '0001_initial'),
('checklist', '0005_auto_20181216_1231'),
]
operations = [
migrations.AlterModelOptions(
name='checklistentry',
options={'ordering': ['-checkListEntrySeverity', 'checkListEntryTitle']},
),
migrations.RemoveField(
model_name='checklistcategory',
name='wikiEntry',
),
migrations.AddField(
model_name='checklistentry',
name='wikiEntry',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='wiki.WikiEntry'),
),
]
......@@ -2,8 +2,6 @@ from django.db import models
class CheckListCategory(models.Model):
wikiEntry = models.ForeignKey(
'wiki.WikiEntry', on_delete=models.SET_NULL, blank=True, null=True)
categoryTitle = models.CharField(max_length=100)
def getEntries(self):
......@@ -16,6 +14,8 @@ class CheckListCategory(models.Model):
class CheckListEntry(models.Model):
checklistCategory = models.ForeignKey(
'checklist.CheckListCategory', on_delete=models.SET_DEFAULT, default=1)
wikiEntry = models.ForeignKey(
'wiki.WikiEntry', on_delete=models.SET_NULL, blank=True, null=True)
checkListEntryTitle = models.CharField(max_length=200)
checkListEntrySeverity = models.CharField(max_length=10)
checkListEntryDescription = models.TextField(blank=True, null=True)
......@@ -24,4 +24,4 @@ class CheckListEntry(models.Model):
return self.checkListEntryTitle
class Meta:
ordering = ['checkListEntryTitle', '-checkListEntrySeverity']
ordering = ['-checkListEntrySeverity', 'checkListEntryTitle']
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment