Fix no-op transaction error on paste.create Conduit API method
Summary: Fixes T9735. I changed how the TYPE_LANGUAGE transction works a little but that accidentally tripped an error condition in `paste.create`. - Don't bail on no-effect transactions to `paste.create` (like not setting a language). - When a transaction type has no tailored UI message, make it easier to figure out which transaction is problematic. Test Plan: Ran `arc paste ...` locally. Got an error before the patch, clean paste creation afterward. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9735 Differential Revision: https://secure.phabricator.com/D14440
This commit is contained in:
@@ -60,6 +60,7 @@ final class PasteCreateConduitAPIMethod extends PasteConduitAPIMethod {
|
||||
|
||||
$editor = id(new PhabricatorPasteEditor())
|
||||
->setActor($viewer)
|
||||
->setContinueOnNoEffect(true)
|
||||
->setContentSourceFromConduitRequest($request);
|
||||
|
||||
$xactions = $editor->applyTransactions($paste, $xactions);
|
||||
|
||||
@@ -626,7 +626,9 @@ abstract class PhabricatorApplicationTransaction
|
||||
return pht('Edges already exist; transaction has no effect.');
|
||||
}
|
||||
|
||||
return pht('Transaction has no effect.');
|
||||
return pht(
|
||||
'Transaction (of type "%s") has no effect.',
|
||||
$this->getTransactionType());
|
||||
}
|
||||
|
||||
public function getTitle() {
|
||||
|
||||
Reference in New Issue
Block a user