fix: consolidate CMS page seed scripts and fix 3 bugs
- Fix `ContentPage.store_id is None` (Python identity check, always False) → use `.is_(None)` for proper SQLAlchemy NULL filtering - Create pages for ALL platforms instead of only OMS - Merge create_platform_pages.py into create_default_content_pages.py (5 overlapping pages, only platform_homepage was unique) - Delete redundant create_platform_pages.py - Update Makefile, install.py, and docs references Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,10 +12,10 @@
|
||||
| Script | Purpose | In Makefile? | Issues |
|
||||
|--------|---------|--------------|--------|
|
||||
| `seed_demo.py` | Create merchants, stores, customers, products | ✅ Yes | ❌ Missing inventory creation |
|
||||
| `create_default_content_pages.py` | Create platform CMS pages (about, faq, etc.) | ✅ Yes (`create-cms-defaults`) | ✅ Good |
|
||||
| `create_default_content_pages.py` | Create platform CMS pages (homepage, about, faq, etc.) for ALL platforms | ✅ Yes (`create-cms-defaults`) | ✅ Good (consolidated) |
|
||||
| `create_inventory.py` | Create inventory for products | ❌ **NO** | ⚠️ Should be in seed_demo |
|
||||
| `create_landing_page.py` | Create landing pages for stores | ❌ **NO** | ⚠️ Should be in seed_demo |
|
||||
| `create_platform_pages.py` | Create platform pages | ❌ **NO** | 🔴 **DUPLICATE** of create_default_content_pages |
|
||||
| ~~`create_platform_pages.py`~~ | ~~Create platform pages~~ | - | ✅ **DELETED** (merged into create_default_content_pages) |
|
||||
| `init_production.py` | Create admin user + platform alerts | ✅ Yes (`init-prod`) | ✅ Good |
|
||||
| `init_log_settings.py` | Initialize log settings | ❌ NO | ⚠️ Should be in init_production? |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user