Skip to content

Commit 4087e73

Browse files
committed
Update Datasets.scala
1 parent 8468ab1 commit 4087e73

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/api/Datasets.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,7 +2318,7 @@ class Datasets @Inject()(
23182318
}
23192319

23202320
// BagIt "header" data e.g. date, author
2321-
private def addBagItTextToZip(totalbytes: Long, totalFiles: Long, zip: ZipOutputStream, dataset: models.Dataset, contact: Option[User]) = {
2321+
private def addBagItTextToZip(totalbytes: Long, totalFiles: Long, zip: ZipOutputStream, dataset: models.Dataset, user: Option[User]) = {
23222322
zip.putNextEntry(new ZipEntry("bagit.txt"))
23232323
var s = ""
23242324
s += "Bag-Software-Agent: clowder.ncsa.illinois.edu\n"
@@ -2327,9 +2327,9 @@ class Datasets @Inject()(
23272327
s += "Payload-Oxum: " + totalbytes + "." + totalFiles + "\n"
23282328
s += "Internal-Sender-Identifier: " + dataset.id + "\n"
23292329
s += "Internal-Sender-Description: " + dataset.description + "\n"
2330-
if (contact.isDefined) {
2331-
s += "Contact-Name: " + contact.get.fullName + "\n"
2332-
s += "Contact-Email: " + contact.get.email.getOrElse("") + "\n"
2330+
if (user.isDefined) {
2331+
s += "Contact-Name: " + user.get.fullName + "\n"
2332+
s += "Contact-Email: " + user.get.email.getOrElse("") + "\n"
23332333
}
23342334
Some(new ByteArrayInputStream(s.getBytes("UTF-8")))
23352335
}

0 commit comments

Comments
 (0)