Skip to content

Commit

Permalink
Log model indexes declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Nov 30, 2024
1 parent 5abd0b5 commit c50c808
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cms/templates/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# and with index_together = ["content_type", "object_id"])
import inspect
exec(inspect.getsource(LogEntry).replace('db_table = "django_admin_log"',
'index_together = ["content_type", "object_id"]')\
'indexes = ["content_type", "object_id"]')\
.replace('class LogEntry','class Log')\
.replace('models.TextField(_("object id"), blank=True, null=True)',
'models.PositiveIntegerField(_("object id"), blank=True, null=True)')) #nosec
Expand Down

0 comments on commit c50c808

Please sign in to comment.