Skip to content

Commit

Permalink
bug fix mail creation ref #1059
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Jun 22, 2023
1 parent f337f89 commit 38802b6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
3 changes: 2 additions & 1 deletion filemanager/filemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ def listForTable(self):
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:
Expand Down
23 changes: 13 additions & 10 deletions plogical/childDomain.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,20 @@ def findChildDomainsJson(self):
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 + ']'

Expand Down
5 changes: 4 additions & 1 deletion websiteFunctions/website.py
Original file line number Diff line number Diff line change
Expand Up @@ -2382,7 +2382,10 @@ def fetchChildDomainsMain(self, userID=None, data=None):

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])
Expand Down

0 comments on commit 38802b6

Please sign in to comment.