Skip to content

Commit

Permalink
Fix serializing message logs when publishing from stores.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtnpro committed Jul 3, 2016
1 parent 13e1202 commit a508196
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ircb/models/logs.py
Expand Up @@ -25,13 +25,13 @@ class BaseLog(object):

def to_dict(self, serializable=False):
d = super().to_dict()
if serializable:
d['timestamp'] = self.timestamp.timestamp()
d['created'] = self.created.timestamp()
d['last_updated'] = self.last_updated.timestamp()
d['timestamp'] = self.timestamp.timestamp()
d['created'] = self.created.timestamp()
d['last_updated'] = self.last_updated.timestamp()
return d


class MessageLog(Base, BaseLog):
class MessageLog(BaseLog, Base):
"""
Network/Channel/PM messages
"""
Expand All @@ -41,7 +41,7 @@ class MessageLog(Base, BaseLog):
from_user_id = sa.Column(sa.Integer, nullable=True, default=None)


class ActivityLog(Base, BaseLog):
class ActivityLog(BaseLog, Base):
"""
Channel activity(join, part, quit) logs
"""
Expand Down

0 comments on commit a508196

Please sign in to comment.