Skip to content

Commit

Permalink
handle org address the same way
Browse files Browse the repository at this point in the history
  • Loading branch information
vegu committed Mar 25, 2024
1 parent a4486d2 commit b14010d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rdap/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def _parse(self):
org_name = ""
org_address = ""
org_name_final = False
org_address_final = False

for ent in self._data.get("entities", []):
vcard = self._parse_vcard(ent)
Expand All @@ -118,8 +119,10 @@ def _parse(self):
org_name = vcard["fn"]
if "org" in kind:
org_name_final = True
if "adr" in vcard:
if "adr" in vcard and not org_address_final:
org_address = vcard["adr"]
if "org" in kind:
org_address_final = True

# check nested entities
for nent in ent.get("entities", []):
Expand Down

0 comments on commit b14010d

Please sign in to comment.