Skip to content

Commit

Permalink
999999999_7200235.py (#45): bugfix; adm0 should not double unm49 afte…
Browse files Browse the repository at this point in the history
…r :0 (only one option availible)
  • Loading branch information
fititnt committed Jul 21, 2022
1 parent 2005f32 commit 2c2fbf2
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions officina/999999999/0/L999999999_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -3377,14 +3377,21 @@ def praeparatio_numerordinatio(self):
_identitas_locali = linea[identitas_locali_index]
# Special case: replace ISO2/ISO3 with UN m49 if is country
if self.ordo == 0:
_identitas_locali = self.unm49

_numerordinatio = '{0}:{1}:{2}:{3}'.format(
self.numerordinatio_praefixo,
self.unm49,
str(self.ordo),
_identitas_locali,
)
# _identitas_locali = self.unm49
# adm0 is an special case: the unm49 already is at the base
# so we as only one option can exist ("0"), no redundancy need
_numerordinatio = '{0}:{1}:{2}'.format(
self.numerordinatio_praefixo,
self.unm49,
str(self.ordo)
)
else:
_numerordinatio = '{0}:{1}:{2}:{3}'.format(
self.numerordinatio_praefixo,
self.unm49,
str(self.ordo),
_identitas_locali,
)
# linea_novae = [_numerordinatio, _numerordinatio]
linea_novae = [_numerordinatio]
linea_novae.extend(linea)
Expand Down

0 comments on commit 2c2fbf2

Please sign in to comment.