Skip to content

Conversation

@sravfeyn
Copy link
Member

Product Description

Fixes a 500 https://dimagi.atlassian.net/browse/CI-450

Technical Summary

Small bug fix

Safety Assurance

Safety story

Automated test coverage

QA Plan

Labels & Review

  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@sravfeyn
Copy link
Member Author

@Charl1996 FYI

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 24, 2025

Walkthrough

The InvoiceCreateView.get_form_kwargs method in commcare_connect/opportunity/views.py has been modified to conditionally add the is_opportunity_pm parameter to kwargs. Previously, this parameter was always included; now it is only added when the AUTOMATED_INVOICES flag is active. This change affects how the invoice form is initialized when automation is disabled.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description references a specific bug fix (CI-450) and indicates it is a small bug fix, which relates to the changeset that conditionally adds a kwarg based on feature flags.
Title check ✅ Passed The title 'don't pass unnecessary kwarg' directly reflects the main change: conditionally adding is_opportunity_pm instead of always passing it.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sr/bug-invoice

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.

@sravfeyn sravfeyn requested a review from ajeety4 December 24, 2025 07:30
@sravfeyn sravfeyn changed the title dont pass unnecessary kwarg don't pass unnecessary kwarg Dec 24, 2025
Copy link
Contributor

@ajeety4 ajeety4 left a comment

Choose a reason for hiding this comment

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

Thanks for catching this.

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.

4 participants