Skip to content

Commit

Permalink
midas3.py MIDASSIP.fromPOD bug fix: proper handling of uploaddir over…
Browse files Browse the repository at this point in the history
…ride
  • Loading branch information
RayPlante committed Sep 10, 2024
1 parent e06c187 commit 7efaf83
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions python/nistoar/pdr/preserv/bagger/midas3.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,11 @@ def fromNERD(cls, nerdrec, reviewdir, uploaddir=None):

recnum = _midadid_to_dirname(midasid)
revdir = os.path.join(reviewdir, recnum)
upldir = os.path.join(uploaddir, recnum)
if not os.path.isdir(upldir):
upldir = None
upldir = None
if uploaddir:
upldir = os.path.join(uploaddir, recnum)
if not os.path.isdir(upldir):
upldir = None

out = cls(nerd.get('ediid'), revdir, upldir, nerdrec=nerd)

Expand Down

0 comments on commit 7efaf83

Please sign in to comment.