mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Channel may not have a directory while testing.
This commit is contained in:
parent
83bd19d91f
commit
2c6fdc42ad
1 changed files with 1 additions and 1 deletions
|
|
@ -443,7 +443,7 @@ class Channel(ModelHelper, Base):
|
|||
|
||||
def dict(self, with_statistics: bool = False):
|
||||
d = super(Channel, self).dict()
|
||||
d['directory'] = self.directory.relative_to(get_media_directory())
|
||||
d['directory'] = self.directory.relative_to(get_media_directory()) if self.directory else None
|
||||
if with_statistics:
|
||||
d['statistics'] = self.get_statistics()
|
||||
return d
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue