Skip to content

Commit 2d39cb8

Browse files
bakerboy448claude
andcommitted
fix: correct database column name mismatch in force refresh query
Fixed incorrect variable name 'timestamp' to 'created_at' to match the database schema. This was causing force-wiki operations to fail with "table processed_actions has no column named timestamp" error. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1ec3f9a commit 2d39cb8

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

modlog_wiki_publisher.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -681,17 +681,17 @@ def get_recent_actions_from_db(config: Dict[str, Any], force_all_actions: bool =
681681
# Convert database rows to mock action objects for compatibility with existing functions
682682
mock_actions = []
683683
for row in rows:
684-
action_id, action_type, moderator, target_id, target_type, display_id, target_permalink, removal_reason, target_author, timestamp = row
685-
logger.debug(f"Processing cached action: {action_type} by {moderator} at {timestamp}")
684+
action_id, action_type, moderator, target_id, target_type, display_id, target_permalink, removal_reason, target_author, created_at = row
685+
logger.debug(f"Processing cached action: {action_type} by {moderator} at {created_at}")
686686

687687
# Create a mock action object with the data we have
688688
class MockAction:
689-
def __init__(self, action_id, action_type, moderator, target_id, target_type, display_id, target_permalink, removal_reason, target_author, timestamp):
689+
def __init__(self, action_id, action_type, moderator, target_id, target_type, display_id, target_permalink, removal_reason, target_author, created_at):
690690
self.id = action_id
691691
self.action = action_type
692692
self.mod = moderator
693-
# Use the timestamp directly
694-
self.created_utc = timestamp
693+
# Use the created_at directly
694+
self.created_utc = created_at
695695
self.details = removal_reason
696696
self.display_id = display_id
697697
self.target_permalink = target_permalink.replace('https://reddit.com', '') if target_permalink and target_permalink.startswith('https://reddit.com') else target_permalink
@@ -701,7 +701,7 @@ def __init__(self, action_id, action_type, moderator, target_id, target_type, di
701701
self.target_title = None
702702
self.target_author = target_author # Use actual target_author from database
703703

704-
mock_actions.append(MockAction(action_id, action_type, moderator, target_id, target_type, display_id, target_permalink, removal_reason, target_author, timestamp))
704+
mock_actions.append(MockAction(action_id, action_type, moderator, target_id, target_type, display_id, target_permalink, removal_reason, target_author, created_at))
705705

706706
logger.info(f"Retrieved {len(mock_actions)} actions from database for force refresh")
707707
return mock_actions

0 commit comments

Comments
 (0)