1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 13:00:56 +01:00

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:
epriestley 2015-11-08 05:21:54 -08:00
parent c86a514f84
commit 2b41ed01c6
2 changed files with 4 additions and 1 deletions

View file

@ -60,6 +60,7 @@ final class PasteCreateConduitAPIMethod extends PasteConduitAPIMethod {
$editor = id(new PhabricatorPasteEditor())
->setActor($viewer)
->setContinueOnNoEffect(true)
->setContentSourceFromConduitRequest($request);
$xactions = $editor->applyTransactions($paste, $xactions);

View file

@ -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() {