fix(site): pick only enabled root domains when fetching options for new site#6697
Conversation
Confidence Score: 5/5Safe 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.
|
| 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, ... }"
Reviews (1): Last reviewed commit: "fix(site): pick only enabled root domain..." | Re-trigger Greptile
Codecov Report❌ Patch coverage is
❌ 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@Mergifyio backport master |
✅ Backports have been createdDetails
|
fix(site): pick only enabled root domains when fetching options for new site (backport #6697)
No description provided.