location-importer.in: always convert organisation handles into upper cases

Message ID 20201103153108.17131-1-peter.mueller@ipfire.org
State Accepted
Commit e7d612e5219ef9ba612ed404e4e2c174110d3dd7
Headers show
Series
  • location-importer.in: always convert organisation handles into upper cases
Related show

Commit Message

Peter Müller Nov. 3, 2020, 3:31 p.m. UTC
Fixes: #12523

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
---
 src/python/location-importer.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/src/python/location-importer.in b/src/python/location-importer.in
index 864eab1..2dec89e 100644
--- a/src/python/location-importer.in
+++ b/src/python/location-importer.in
@@ -560,7 +560,7 @@  class CLI(object):
 					autnum["asn"] = m.group(2)
 
 			elif key == "org":
-				autnum[key] = val
+				autnum[key] = val.upper()
 
 		# Skip empty objects
 		if not autnum:
@@ -646,7 +646,9 @@  class CLI(object):
 			# Split line
 			key, val = split_line(line)
 
-			if key in ("organisation", "org-name"):
+			if key == "organisation":
+				org[key] = val.upper()
+			elif key == "org-name":
 				org[key] = val
 
 		# Skip empty objects