fix error

This commit is contained in:
bkfox 2022-04-29 14:52:42 +02:00
parent d4676a5dd1
commit a805ce6777

View File

@ -132,7 +132,7 @@ class Program(Page):
# TODO: move in signals
path_ = getattr(self, '__initial_path', None)
abspath = os.path.join(conf.MEDIA_ROOT, path_)
abspath = path_ and os.path.join(conf.MEDIA_ROOT, path_)
if path_ is not None and path_ != self.path and \
os.path.exists(abspath) and not os.path.exists(self.abspath):
logger.info('program #%s\'s dir changed to %s - update it.',