Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
improve readibility of the approve dag
Browse files Browse the repository at this point in the history
  • Loading branch information
DonHaul committed Aug 19, 2024
1 parent debd223 commit ea4a0f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 8 additions & 8 deletions backoffice/backoffice/workflows/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -85,10 +89,6 @@ class WorkflowAdmin(ModelAdmin):
"_updated_at",
]

formfield_overrides = {
JSONField: {"widget": JSONEditorWidget},
}


@admin.register(Decision)
class DecisionAdmin(admin.ModelAdmin):
Expand All @@ -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
2 changes: 2 additions & 0 deletions workflows/tests/test_author_create_tasks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def create_decision_on_curation_choice():
pass

0 comments on commit ea4a0f1

Please sign in to comment.