Skip to content

Commit 207e175

Browse files
authored
Feat/bugs 2 9 x (#405)
* fix sql * fix sql
1 parent b62ee99 commit 207e175

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

docs/source/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ Glossary
3232
Releases
3333
----------------------
3434

35+
v2.9.7
36+
=================
37+
- Fixed channels not being visible though GUI, when using SQL logging.
38+
39+
3540
v2.9.6
3641
=================
3742
- Fixed crash if ``start_period`` is larger than ``end_period``.

src/daf/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
from .misc import *
2020

2121

22-
VERSION = "2.9.6"
22+
VERSION = "2.9.7"

src/daf/logging/sql/tables.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,11 @@ def __init__(self, channel: CHANNEL, reason: str = None):
236236
self.channel = channel
237237
self.reason = reason
238238

239-
def __eq__(self, __value: object) -> bool:
240-
return (
241-
isinstance(__value, MessageChannelLOG) and
242-
(self.channel_id, self.log_id) == (__value.channel_id, __value.log_id)
243-
)
239+
def __eq__(self, value: object) -> bool:
240+
return self is value # Can't compare by ID due to circular links, which ORM ignores.
244241

245242
def __hash__(self):
246-
return hash((self.channel_id, self.log_id))
243+
return id(MessageChannelLOG)
247244

248245

249246
class MessageLOG(ORMBase):

0 commit comments

Comments
 (0)