Skip to content

Commit

Permalink
fix: HL-1191, HL-1405 , HL-1420 (#3225)
Browse files Browse the repository at this point in the history
* feat: searchable audit_logs in admin

* fix: allow null in ahjo_error admin form

* fix: missing xml file type in admin dropdown
  • Loading branch information
rikuke authored Aug 26, 2024
1 parent 69ac2d5 commit 0eb0ee8
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.11 on 2024-08-22 07:36

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("applications", "0078_ahjostatus_error_from_ahjo"),
]

operations = [
migrations.AlterField(
model_name="ahjostatus",
name="error_from_ahjo",
field=models.JSONField(blank=True, null=True),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Generated by Django 4.2.11 on 2024-08-22 12:33

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("applications", "0079_alter_ahjostatus_error_from_ahjo"),
]

operations = [
migrations.AlterField(
model_name="attachment",
name="content_type",
field=models.CharField(
choices=[
("application/pdf", "pdf"),
("image/png", "png"),
("image/jpeg", "jpeg"),
("application/xml", "xml"),
],
max_length=100,
verbose_name="technical content type of the attachment",
),
),
migrations.AlterField(
model_name="historicalattachment",
name="content_type",
field=models.CharField(
choices=[
("application/pdf", "pdf"),
("image/png", "png"),
("image/jpeg", "jpeg"),
("application/xml", "xml"),
],
max_length=100,
verbose_name="technical content type of the attachment",
),
),
]
2 changes: 2 additions & 0 deletions backend/benefit/applications/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
("application/pdf", "pdf"),
("image/png", "png"),
("image/jpeg", "jpeg"),
("application/xml", "xml"),
)


Expand Down Expand Up @@ -1164,6 +1165,7 @@ class AhjoStatus(TimeStampedModel):
)
error_from_ahjo = JSONField(
null=True,
blank=True,
)

def __str__(self):
Expand Down
1 change: 1 addition & 0 deletions backend/shared/shared/audit_log/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class AuditLogEntryAdmin(admin.ModelAdmin):
fields = ("id", "created_at", "message")
list_display = ["message", "created_at"]
readonly_fields = ("id", "created_at", "message")
search_fields = ["message", "created_at"]


if apps.is_installed("django.contrib.admin"):
Expand Down

0 comments on commit 0eb0ee8

Please sign in to comment.