Skip to content

Commit

Permalink
Merge pull request #81 from ecolabdata/fix/spurious-geonet-info
Browse files Browse the repository at this point in the history
fix: Spurious geonet:info appearing in original XML
  • Loading branch information
streino authored Oct 31, 2024
2 parents 5e892f1 + 143f34e commit 48f9622
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions isomorphe/migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ def transform(
for r in selection:
log.debug(f"Processing record {r.uuid}: md_type={r.md_type.name}, state={r.state}")
original = self.gn.get_record(r.uuid)
# FIXME: extract_record_info() mutates `original`
# In the mean time, this must happen before we store `original` in the BatchRecord
info = extract_record_info(original, sources)
batch_record = TransformBatchRecord(
url=self.gn.url,
uuid=r.uuid,
Expand All @@ -133,8 +136,6 @@ def transform(
)
continue
try:
# FIXME: extract_record_info() mutates original
info = extract_record_info(original, sources)
log.debug(
f"Applying transformation {transformation.name} to {r.uuid} with params {transformation_params}"
)
Expand Down

0 comments on commit 48f9622

Please sign in to comment.