[GrandComicsDatabase/gcd-django] Fix character-order revision commit handling (Issue #730)

2 views
Skip to first unread message

Adam Hernandez

unread,
Jul 27, 2026, 5:20:08 PM (13 days ago) Jul 27
to GrandComicsDatabase/gcd-django, Subscribed
DeusExTaco created an issue (GrandComicsDatabase/gcd-django#730)

Problem

Current beta character-order code has two correctness concerns surfaced by the automated review of #729:

  • CharacterOrderRevision._post_save_object() reads order_code from StoryCharacterRevision, although the value belongs to CharacterThroughOrderRevision, and then saves the character rather than the through row. This can raise AttributeError and fail to persist ordering changes.
  • StoryCharacterRevisionForm assumes a saved instance before evaluating related managers. The outer if instance does not distinguish saved from unsaved model instances, and group_name.exists() is reached before the bot-proposed instance.pk guard. Confirm whether normal inline-formset construction exercises this path before choosing the complete fix.

These paths already exist on beta; #729 only exposed them because it synchronizes beta into api-v2.

Review context:

Suggested acceptance criteria

  • Add regression coverage for committing character-order additions, removals, and order-code changes.
  • Read and write order codes through the correct through models.
  • Avoid per-character database queries while applying a revision.
  • Add form/formset coverage for both saved and unsaved StoryCharacterRevision instances, then guard all related-manager access that is reachable for unsaved instances.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/issues/730@github.com>

JochenGCD

unread,
Jul 27, 2026, 5:28:43 PM (13 days ago) Jul 27
to GrandComicsDatabase/gcd-django, Subscribed
jochengcd left a comment (GrandComicsDatabase/gcd-django#730)

there are no unsaved instances here


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/issues/730/5097012147@github.com>

JochenGCD

unread,
Aug 8, 2026, 10:24:51 AM (2 days ago) Aug 8
to GrandComicsDatabase/gcd-django, Subscribed

Closed #730 as completed via #736.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/issue/730/issue_event/29160225240@github.com>

Reply all
Reply to author
Forward
0 new messages