Commit 68a3d1f
committed
Refactor catalog category sorting to prioritize product counts
- Updated the return statement in the catalog_categories function to sort categories based on the total product count in their subcategories.
- Enhanced readability by using sorted() with a custom key for improved clarity in the sorting logic.1 parent 81b79b1 commit 68a3d1f
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| |||
0 commit comments