def __init__(self, row):
for k, v in dict(row).items():
setattr(self, k, v)
- self.is_private = hasattr(self, 'channel_id') and self.channel_id == 'private'
- if not hasattr(self, 'newsflash_channel_id'):
+ if hasattr(self, 'newsflash_channel_id'):
+ self.is_private = hasattr(self, 'newsflash_channel_id') and self.newsflash_channel_id == 'private'
+ else:
self.newsflash_channel_id = None
+ self.is_private = hasattr(self, 'channel_id') and self.channel_id == 'private'
def owned_by(self, owner):
try: