Skip to content

Commit

Permalink
remove n as a parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
diversemix committed Oct 3, 2023
1 parent 2fbdf3e commit 8c7d6be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/db/models/app/counters.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ def get_next_count(self) -> str:
_LOGGER.exception(f"When generating counter for {self.prefix}")
raise

def get_import_id(self, entity: CountedEntity, n: int = 0) -> str:
def get_import_id(self, entity: CountedEntity) -> str:
"""gets an import id"""
# Validation
prefix_ok = (
self.prefix == ORGANISATION_CCLW or self.prefix == ORGANISATION_UNFCCC
)
if not prefix_ok:
raise RuntimeError("Prefix is not a known organisation!")

n = 0 # The fourth quad is historical
i_value = str(self.get_next_count()).zfill(8)
n_value = str(n).zfill(4)
return f"{self.prefix}.{entity.value}.i{i_value}.n{n_value}"

0 comments on commit 8c7d6be

Please sign in to comment.