3 Commits
Author SHA1 Message Date
Bentlybro dd455d4dd3 Refactor project and moderation rule creation logic
Project and moderation rule creation methods now return dictionaries instead of ORM instances to avoid detached instance issues. Updated related usages in dashboard route and default rules configuration to match new return types and argument names. Also added cascade delete-orphan to APIUser's project relationship.
2025-09-11 09:11:37 +01:00
Bentlybro b478a7661c Refactor moderation rules and minor code cleanup
Updated config/default_rules.py to use multi-line strings for rule descriptions and prompts for improved readability. Minor code cleanups in admin.py, openai_client.py, result_cache.py, and websocket_notifier.py for consistency and error handling.
2025-08-25 19:29:13 +01:00
Bentlybro 1c8dbe36ef Refactor default moderation rules to config module
Moved default moderation rules to a new config/default_rules.py module and replaced inline rule creation in dashboard.py with a call to create_default_rules. This improves maintainability and centralizes rule configuration.
2025-08-21 21:21:27 +01:00