Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django Admin - 500 error on saving any DB record without making changes #4517

Open
2 tasks done
rnovak338 opened this issue Dec 5, 2024 · 0 comments
Open
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@rnovak338
Copy link
Contributor

rnovak338 commented Dec 5, 2024

Describe the bug

LogEntry expects changes to be recorded when you edit a DB entry in Django Admin. It parses a JSON snippet during this event.
However, if a record is "updated" but no changes to the fields are made, this JSON changelog snippet is empty while the logic for LogEntry is still expecting there to be JSON to work with. This leads to a 500 error.

Steps to reproduce the bug

  1. Log into the admin panel.
  2. Make changes to an editable record.
  3. Attempt to save - you should experience a 500 crash.

Expected Behavior

The changes should save successfully, and a LogEntry should be created with no JSON, indicating that no changes were actually made.

Code of Conduct

@rnovak338 rnovak338 added the bug Something isn't working label Dec 5, 2024
@rnovak338 rnovak338 self-assigned this Dec 5, 2024
@rnovak338 rnovak338 added this to FAC Dec 5, 2024
@github-project-automation github-project-automation bot moved this to Triage in FAC Dec 5, 2024
@rnovak338 rnovak338 moved this from Triage to In Progress in FAC Dec 5, 2024
@rnovak338 rnovak338 moved this from In Progress to Done in FAC Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

1 participant