Skip to content

Commit

Permalink
Merge pull request #26 from adinhodovic/fix-get-or-create
Browse files Browse the repository at this point in the history
fix: Use default for get or create
  • Loading branch information
adinhodovic committed Feb 29, 2024
2 parents f1f778d + b976054 commit 13e5b2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_admin_shellx/consumers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 13e5b2d

Please sign in to comment.