diff --git a/harnessed_reasoning/core.py b/harnessed_reasoning/core.py index 7093feb..40df9e7 100644 --- a/harnessed_reasoning/core.py +++ b/harnessed_reasoning/core.py @@ -130,7 +130,7 @@ class HermesReasoningEngine: where = {} if user_id: where['user_id'] = user_id - rows = await sor.R('harnessed_reasoning_config', where if where else None, ns={'sort': 'updated_at desc'}) + rows = await sor.R('harnessed_reasoning_config', {'user_id': user_id, 'sort': 'updated_at desc'} if user_id else {'sort': 'updated_at desc'}) if rows: return rows[0] except Exception as e: @@ -690,7 +690,7 @@ class HermesReasoningEngine: try: async with self.db.sqlorContext('default') as sor: - rows = await sor.R('harnessed_reasoning_sessions', {'user_id': user_id}, ns={'sort': 'created_at desc'}) + rows = await sor.R('harnessed_reasoning_sessions', {'user_id': user_id, 'sort': 'created_at desc'}) rows = rows or [] rows = rows[offset:offset + limit]