Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 0940fc6

Browse files
author
Michael Grauer
committed
BUG: refs #0349. uploadPerform with revision=head now only creates 1 new rev.
If uploadPerform was called with revision=head on an item without any revs, two new revs would be created and the upload would happen on the 2nd rev.
1 parent 1fc0272 commit 0940fc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/api/controllers/components/ApiComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ function uploadPerform($args)
329329
$revision->setUser_id($userDao->getKey());
330330
$revision->setDate(date('c'));
331331
$revision->setLicense(null);
332-
$revision = $itemModel->addRevision($item, $revision);
332+
$itemModel->addRevision($item, $revision);
333333
}
334334
}
335335
else

0 commit comments

Comments
 (0)