Добавлен фильтр одинаковых записей в шапке шаблона

master 3.7.5.6
root 1 month ago
parent 7390df9a88
commit 78dac94217

@ -4251,7 +4251,7 @@ gettext -d cl_template "$*"
continue
else:
line = line.replace("#", '').strip()
if os.path.exists(line):
if os.path.exists(line) and line not in commentsList:
commentsList.append(line)
return commentsList
@ -6243,6 +6243,8 @@ gettext -d cl_template "$*"
# Титл конфигурационного файла
title = ""
if ListOptTitle:
# prevComments = self.getPrevComments(nameFileConfig, self.__titleHead)
# ListOptTitle = prevComments + [x for x in ListOptTitle if x not in prevComments]
title = self.getTitle(objHeadNew.comment, ListOptTitle,
configPath=nameFileConfig)
@ -6543,7 +6545,11 @@ gettext -d cl_template "$*"
# Титл для объединения
if ListOptTitle:
prevComments = self.getPrevComments(nameFileConfig, self.__titleHead)
ListOptTitle = prevComments + [x for x in ListOptTitle if x not in prevComments]
newListOptTitle = []
for x in ListOptTitle:
if x not in prevComments and x not in newListOptTitle:
newListOptTitle.append(x)
ListOptTitle = newListOptTitle
title = self.getTitle(objTemplNew._comment,
ListOptTitle,
configPath=nameFileConfig)

Loading…
Cancel
Save