diff --git a/django_admin_shellx/consumers.py b/django_admin_shellx/consumers.py index 010c9d7..7fa756d 100644 --- a/django_admin_shellx/consumers.py +++ b/django_admin_shellx/consumers.py @@ -181,7 +181,7 @@ def save_command_history(self, command): return tc, _ = TerminalCommand.objects.get_or_create( - command=command, prompt=prompt, created_by=self.user + command=command, prompt=prompt, defaults={"created_by": self.user} ) tc.execution_count += 1 tc.save()