diff --git a/backoffice/backoffice/workflows/admin.py b/backoffice/backoffice/workflows/admin.py index 971abe00..8ece1435 100644 --- a/backoffice/backoffice/workflows/admin.py +++ b/backoffice/backoffice/workflows/admin.py @@ -58,6 +58,10 @@ def has_delete_permission(self, request, obj=None): request, self ) + formfield_overrides = { + JSONField: {"widget": JSONEditorWidget}, + } + @admin.register(Workflow) class WorkflowAdmin(ModelAdmin): @@ -85,10 +89,6 @@ class WorkflowAdmin(ModelAdmin): "_updated_at", ] - formfield_overrides = { - JSONField: {"widget": JSONEditorWidget}, - } - @admin.register(Decision) class DecisionAdmin(admin.ModelAdmin): @@ -98,12 +98,12 @@ class DecisionAdmin(admin.ModelAdmin): ordering = ("-_updated_at",) search_fields = ["id", "data"] - list_display = ("id", "action", "user", "workflow_id") + list_display = ("id", "action_value", "user", "workflow_id") list_filter = [ "action", "user", ] - formfield_overrides = { - JSONField: {"widget": JSONEditorWidget}, - } + @admin.display(description="action") + def action_value(self, obj): + return obj.action diff --git a/workflows/tests/test_author_create_tasks.py b/workflows/tests/test_author_create_tasks.py new file mode 100644 index 00000000..8ba0f108 --- /dev/null +++ b/workflows/tests/test_author_create_tasks.py @@ -0,0 +1,2 @@ +def create_decision_on_curation_choice(): + pass