mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-20 23:12:15 +00:00
Reversion working for training level
This commit is contained in:
@@ -21,7 +21,6 @@ class FieldComparison(object):
|
||||
def display_value(self, value):
|
||||
if (isinstance(self.field, IntegerField) or isinstance(self.field, CharField)) and self.field.choices is not None and len(self.field.choices) > 0:
|
||||
choice = [x[1] for x in self.field.choices if x[0] == value]
|
||||
# TODO This defensive piece should not be necessary?
|
||||
if len(choice) > 0:
|
||||
return choice[0]
|
||||
if isinstance(self.field, BooleanField):
|
||||
@@ -122,7 +121,7 @@ class ModelComparison(object):
|
||||
old_item_versions = self.version.parent.revision.version_set.exclude(content_type=item_type)
|
||||
new_item_versions = self.version.revision.version_set.exclude(content_type=item_type).exclude(content_type=ContentType.objects.get_for_model(models.EventAuthorisation))
|
||||
|
||||
comparisonParams = {'excluded_keys': ['id', 'event', 'order', 'checklist']}
|
||||
comparisonParams = {'excluded_keys': ['id', 'event', 'order', 'checklist', 'level']}
|
||||
|
||||
# Build some dicts of what we have
|
||||
item_dict = {} # build a list of items, key is the item_pk
|
||||
|
||||
Reference in New Issue
Block a user