diff --git a/backend/tools/seed.py b/backend/tools/seed.py index 5f8912a..08ba223 100644 --- a/backend/tools/seed.py +++ b/backend/tools/seed.py @@ -212,6 +212,18 @@ async def run() -> None: "category_reference_units, unit_conversions, standard_conversions " "RESTART IDENTITY CASCADE" )) + # Only the 8 canonical topic categories may exist — any leftover slug + # (e.g. «سیم», «کابل» from earlier testing) is removed so the topic + # grids keep showing exactly the same 8 categories as always. + await db.execute( + text( + "DELETE FROM material_categories WHERE slug NOT IN (" + "'mechanical-installations-pipes','electrical-equipment-supplies'," + "'doors-windows-glass','metals-steel-sections','construction-materials'," + "'construction-chemicals','finishing-interior-decoration'," + "'construction-tools-equipment')" + ) + ) # ---- users (roles bound to Casdoor identities by username) ---- users: dict[str, User] = {} diff --git a/backups/procurement.dump b/backups/procurement.dump index f5368d8..bb91e73 100644 Binary files a/backups/procurement.dump and b/backups/procurement.dump differ