Skip to content

Commit

Permalink
Merge pull request #94 from altf4arnold/xn
Browse files Browse the repository at this point in the history
[FIX] XN needs to be sent in ASCII
  • Loading branch information
altf4arnold authored Jul 31, 2024
2 parents 4f1a22f + f31742a commit df30c71
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions atlas/atlascreator.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@ def webrequest(tld, stack):
dbwriter(tld, stack, measurement)


def dbwriter(unicodetld, stack, measurement):
tld = Atlas.objects.filter(unicodetld=unicodetld)
def dbwriter(intld, stack, measurement):
tld = Atlas.objects.filter(tld=intld)
tldstack = tld.filter(stack=stack)
if tldstack.exists():
primary_key = tldstack.values_list('pk', flat=True).first()
db = Atlas.objects.get(pk=primary_key)
else:
db = Atlas()
db.unicodetld = unicodetld
db.tld = intld
db.stack = stack
if measurement is not None:
db.measurement = measurement
db.save()
tld = TLD.objects.filter(unicodetld=unicodetld)
tld = TLD.objects.filter(tld=intld)
if tld.exists():
primary_key = tld.values_list('pk', flat=True).first()
db = TLD.objects.get(pk=primary_key)
Expand All @@ -88,13 +88,13 @@ def dbwriter(unicodetld, stack, measurement):


def main():
unicodetlds = []
tldslist = []
# This will get the TLD's in unicode format from the database and put them in the list
tlds = TLD.objects.all().order_by('tld')
for tld in tlds:
db = TLD.objects.get(tld=tld)
unicodetlds.append(db.unicodetld)
for tld in unicodetlds:
tlds.append(db.tld)
for tld in tldslist:
db = TLD.objects.get(tld=tld)
if db.atlasv4 is None:
webrequest(tld, 4)
Expand Down

0 comments on commit df30c71

Please sign in to comment.