Skip to content

fix(site): pick only enabled root domains when fetching options for new site#6697

Merged
phot0n merged 1 commit into
frappe:developfrom
phot0n:rd-fx
Jun 11, 2026
Merged

fix(site): pick only enabled root domains when fetching options for new site#6697
phot0n merged 1 commit into
frappe:developfrom
phot0n:rd-fx

Conversation

@phot0n

@phot0n phot0n commented Jun 11, 2026

Copy link
Copy Markdown
Member

No description provided.

@greptile-apps

greptile-apps Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe to merge — the change is a one-field filter addition with no side effects.

The fix correctly gates options_for_new to only return root domains where enabled = 1, matching the existing schema default and the pattern used in virtual_machine.py and root_domain.py. No logic is altered beyond filtering out disabled records.

No files require special attention.

Important Files Changed

Filename Overview
press/api/site.py Single-line fix: adds "enabled": 1 filter to the Root Domain query in options_for_new. Change is correct and consistent with existing patterns elsewhere in the codebase.

Sequence Diagram

sequenceDiagram
    participant Client
    participant options_for_new
    participant PressSettings
    participant RootDomain

    Client->>options_for_new: GET /api/method/press.api.site.options_for_new
    options_for_new->>PressSettings: get_single_value("Press Settings", "domain")
    PressSettings-->>options_for_new: default_domain
    options_for_new->>RootDomain: "get_all(name like %.{default_domain}, enabled=1)"
    Note over options_for_new,RootDomain: Before fix: no enabled filter — disabled domains included
    RootDomain-->>options_for_new: [enabled root domains only]
    options_for_new-->>Client: "{ cluster_specific_root_domains, versions, ... }"
Loading

Reviews (1): Last reviewed commit: "fix(site): pick only enabled root domain..." | Re-trigger Greptile

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 50.65%. Comparing base (8d1e382) to head (94345e0).
⚠️ Report is 55 commits behind head on develop.

Files with missing lines Patch % Lines
press/api/site.py 0.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6697      +/-   ##
===========================================
- Coverage    56.46%   50.65%   -5.82%     
===========================================
  Files          992      993       +1     
  Lines        83408    83690     +282     
  Branches       685      526     -159     
===========================================
- Hits         47097    42393    -4704     
- Misses       36275    41265    +4990     
+ Partials        36       32       -4     
Flag Coverage Δ
dashboard 62.90% <ø> (-27.96%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@phot0n phot0n merged commit 805e7c2 into frappe:develop Jun 11, 2026
13 of 14 checks passed
@phot0n phot0n deleted the rd-fx branch June 11, 2026 12:50
@phot0n

phot0n commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

@Mergifyio backport master

@mergify

mergify Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

backport master

✅ Backports have been created

Details

phot0n added a commit that referenced this pull request Jun 12, 2026
fix(site): pick only enabled root domains when fetching options for new site (backport #6697)
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