diff --git a/filemanager/filemanager.py b/filemanager/filemanager.py index 3aedb1fd4..0608d55f1 100755 --- a/filemanager/filemanager.py +++ b/filemanager/filemanager.py @@ -209,7 +209,8 @@ class FileManager: try: currentFile = items.split(' ') currentFile = [a for a in currentFile if a != ''] - if currentFile[-1] == '.' or currentFile[-1] == '..' or currentFile[0] == 'total': + + if currentFile[-1] == '.' or currentFile[-1] == '..' or currentFile[0] == 'total' or currentFile[-1].startswith('mail.'): continue if len(currentFile) > 9: diff --git a/plogical/childDomain.py b/plogical/childDomain.py index 828bae8ce..af1e385f8 100755 --- a/plogical/childDomain.py +++ b/plogical/childDomain.py @@ -23,17 +23,20 @@ class ChildDomainManager: checker = 0 for items in childDomains: - dic = { - 'childDomain': items.domain, - 'path': items.path, - 'childLunch': '/websites/' + self.masterDomain + '/' + items.domain - } - - if checker == 0: - json_data = json_data + json.dumps(dic) - checker = 1 + if items.domain == f'mail.{master.domain}': + pass else: - json_data = json_data + ',' + json.dumps(dic) + dic = { + 'childDomain': items.domain, + 'path': items.path, + 'childLunch': '/websites/' + self.masterDomain + '/' + items.domain + } + + if checker == 0: + json_data = json_data + json.dumps(dic) + checker = 1 + else: + json_data = json_data + ',' + json.dumps(dic) json_data = json_data + ']' diff --git a/websiteFunctions/website.py b/websiteFunctions/website.py index 7255b54e5..fa88e1ad4 100755 --- a/websiteFunctions/website.py +++ b/websiteFunctions/website.py @@ -2382,7 +2382,10 @@ class WebsiteManager: for web in websites: for child in web.childdomains_set.all(): - childDomains.append(child) + if child.domain == f'mail.{web.domain}': + pass + else: + childDomains.append(child) pagination = self.getPagination(len(childDomains), recordsToShow) json_data = self.findChildsListJson(childDomains[finalPageNumber:endPageNumber])