Skip to content

Conversation

@Nachiket-Roy
Copy link
Contributor

@Nachiket-Roy Nachiket-Roy commented Jan 2, 2026

Related to : #5386
This PR removes the unused CaptchaField from the Issue model. The field was defined in the model but never added to the database schema via migration, resulting in a model-database mismatch.

Since the field is no longer used anywhere in the codebase, removing it resolves the inconsistency and avoids potential future issues.

Problem Addressed

  • CaptchaField existed in website/models.py
  • No migration ever created the corresponding database column
  • Led to silent model-schema divergence
  • Could cause confusion, migration conflicts, or runtime errors later

Why removal is the right fix

  • The field is unused and unreferenced
  • Avoids introducing unnecessary migrations for dead code
  • Keeps the data model clean and accurate
  • Aligns model definitions with the actual database schema

Scope

  • Removes the CaptchaField from the Issue model
  • No functional or behavioral changes elsewhere
  • No impact on existing data or migrations

Testing

  • Existing tests pass
  • No new tests required, as this change removes unused code only

Summary by CodeRabbit

  • Refactor
    • Removed CAPTCHA requirement from issue submission form.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

👋 Hi @Nachiket-Roy!

This pull request needs a peer review before it can be merged. Please request a review from a team member who is not:

  • The PR author
  • DonnieBLT
  • coderabbitai
  • copilot

Once a valid peer review is submitted, this check will pass automatically. Thank you!

@github-actions github-actions bot added the needs-peer-review PR needs peer review label Jan 2, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 2, 2026

Walkthrough

The pull request removes CAPTCHA functionality from the Issue model by deleting the CaptchaField import and removing the captcha field definition from the model class.

Changes

Cohort / File(s) Summary
Model field and import removal
website/models.py
Removed CaptchaField import from captcha.fields and deleted the captcha field from the Issue model class

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

quality: medium

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: removal of an unused CaptchaField from the Issue model to fix a schema mismatch issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between dac01f5 and 54c297b.

📒 Files selected for processing (1)
  • website/models.py
💤 Files with no reviewable changes (1)
  • website/models.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Run Tests
  • GitHub Check: docker-test

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 @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

📊 Monthly Leaderboard

Hi @Nachiket-Roy! Here's how you rank for January 2026:

Rank User PRs Reviews Comments Total
🥈 #2 @Pritz395 0 0 11 22
🥉 #3 @Nachiket-Roy 1 1 1 16
#4 @Saptami191 1 0 0 10

Leaderboard based on contributions in January 2026. Keep up the great work! 🚀

@github-actions github-actions bot added pre-commit: passed Pre-commit checks passed tests: passed Django tests passed labels Jan 2, 2026
@Nachiket-Roy Nachiket-Roy marked this pull request as draft January 2, 2026 16:59
@Nachiket-Roy Nachiket-Roy marked this pull request as ready for review January 2, 2026 16:59
@github-project-automation github-project-automation bot moved this from Backlog to Ready in 📌 OWASP BLT Project Board Jan 2, 2026
@github-actions github-actions bot added last-active: 0d PR last updated 0 days ago last-active: 1d PR last updated 1 day ago and removed last-active: 0d PR last updated 0 days ago labels Jan 3, 2026
Copy link
Contributor

@Jayant2908 Jayant2908 left a comment

Choose a reason for hiding this comment

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

LGTM!

@github-actions github-actions bot added last-active: 0d PR last updated 0 days ago and removed last-active: 1d PR last updated 1 day ago labels Jan 5, 2026
Copy link
Contributor

@S3DFX-CYBER S3DFX-CYBER left a comment

Choose a reason for hiding this comment

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

Great catch on the schema mismatch, @Nachiket-Roy. Removing dead code definitely keeps the migrations cleaner.

One quick security question: Since we are removing the CaptchaField from the model, have we verified that the frontend form for Issue submission still has adequate rate-limiting or alternative protection against bot-spam? I want to make sure we aren't losing a layer of defense here.

@Nachiket-Roy
Copy link
Contributor Author

@S3DFX-CYBER not sure what you are implying but this removed code is not in use anywhere #5386 (comment)

@github-actions github-actions bot removed the last-active: 0d PR last updated 0 days ago label Jan 6, 2026
@github-actions github-actions bot added has-peer-review PR has received peer review last-active: 0d PR last updated 0 days ago and removed needs-peer-review PR needs peer review tests: passed Django tests passed labels Jan 6, 2026
@github-actions github-actions bot added the tests: failed Django tests failed label Jan 7, 2026
@github-actions github-actions bot added tests: passed Django tests passed and removed last-active: 0d PR last updated 0 days ago tests: failed Django tests failed labels Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

files-changed: 1 has-peer-review PR has received peer review pre-commit: passed Pre-commit checks passed quality: medium tests: passed Django tests passed

Projects

Status: Ready

Development

Successfully merging this pull request may close these issues.

3 participants