Skip to content

Commit

Permalink
Fix get_log_channel_ids_view
Browse files Browse the repository at this point in the history
  • Loading branch information
hypergonial committed Oct 19, 2023
1 parent 7c1f40f commit 93766f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/userlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ async def get_log_channel_ids_view(guild_id: int) -> dict[str, int | None]:

records = await userlog.app.db_cache.get(table="log_config", guild_id=guild_id, limit=1)

log_channels = json.loads(records[0]["log_channels"]) if records and records[0]["log_channels"] else {}
log_channels: dict[str, int | None] = json.loads(records[0]["log_channels"]) if records and records[0]["log_channels"] else {}

for log_event in LogEvent:
if log_event.value not in log_channels.keys():
log_channels[log_event] = None
log_channels[log_event.value] = None

return log_channels

Expand Down

0 comments on commit 93766f0

Please sign in to comment.