Skip to content

Fix: Show an error page for an unknown publisher or issue revision - #878

Open
ProfNardi wants to merge 1 commit into
GrandComicsDatabase:betafrom
ProfNardi:fix/add-unknown-id-error
Open

ProfNardi wants to merge 1 commit into
GrandComicsDatabase:betafrom
ProfNardi:fix/add-unknown-id-error

Conversation

@ProfNardi

Copy link
Copy Markdown
Contributor

Description

Adding a series to a publisher that does not exist, or a sequence to an issue revision that is not in the change, should show an error page with a message. The message was built by adding an integer to a string, so these addresses ended in a server error. They now show the message.

The Copy buttons of the add sequence form ended in a server error on such a revision too. They now give a page not found, as an unknown change already does in the same view.

Testing

apps/oi/tests/test_add_unknown_id.py opens the add series and add sequence addresses and both Copy buttons. Without the change all four tests fail. Full suite: 1012 passed, 0 failed.

@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 052118c2-c7a4-41b4-9ec0-b18a0580a767
Commits

Reviewing files that changed from the base of the PR and between 4873e6c and c22a814.

Files selected for processing: 2

  • apps/oi/tests/test_add_unknown_id.py
  • apps/oi/views.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Comment thread apps/oi/views.py
# check if this is a request to add a copy of a sequence
if 'copy' in request.GET or 'copy_cover' in request.GET:
issue_revision = changeset.issuerevisions.get(id=issue_revision_id)
issue_revision = get_object_or_404(changeset.issuerevisions,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the other two can be obtained by editing an URL, this one I am not sure if users edits of URLs can find this.
If not, these only would be due to errors in our workflow, which we want to know about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants