default_time_format if format is blank

This commit is contained in:
w-e-w 2022-10-25 23:39:21 +09:00 committed by AUTOMATIC1111
parent 146856f66d
commit 757264c453

View File

@ -343,7 +343,7 @@ class FilenameGenerator:
def datetime(self, *args):
time_datetime = datetime.datetime.now()
time_format = args[0] if len(args) > 0 else self.default_time_format
time_format = args[0] if len(args) > 0 and args[0] != "" else self.default_time_format
try:
time_zone = pytz.timezone(args[1]) if len(args) > 1 else None
except pytz.exceptions.UnknownTimeZoneError as _: