cob: Fix compatibility with certain old patches
We were rejecting patches that were once valid, due to a rule that was added some time ago. Move that rule one level up, in the write path, instead of in the read path.
This commit is contained in:
parent
6dcfbfcdee
commit
0bb0fe8f25
|
|
@ -864,9 +864,6 @@ impl Patch {
|
||||||
// If the revision was redacted concurrently, there's nothing to do.
|
// If the revision was redacted concurrently, there's nothing to do.
|
||||||
return Ok(());
|
return Ok(());
|
||||||
};
|
};
|
||||||
if summary.is_none() && verdict.is_none() {
|
|
||||||
return Err(Error::EmptyReview);
|
|
||||||
}
|
|
||||||
if let Some(rev) = rev {
|
if let Some(rev) = rev {
|
||||||
// Insert a review if there isn't already one. Otherwise we just ignore
|
// Insert a review if there isn't already one. Otherwise we just ignore
|
||||||
// this operation
|
// this operation
|
||||||
|
|
@ -2173,6 +2170,9 @@ where
|
||||||
labels: Vec<Label>,
|
labels: Vec<Label>,
|
||||||
signer: &G,
|
signer: &G,
|
||||||
) -> Result<ReviewId, Error> {
|
) -> Result<ReviewId, Error> {
|
||||||
|
if verdict.is_none() && summary.is_none() {
|
||||||
|
return Err(Error::EmptyReview);
|
||||||
|
}
|
||||||
self.transaction("Review", signer, |tx| {
|
self.transaction("Review", signer, |tx| {
|
||||||
tx.review(revision, verdict, summary, labels)
|
tx.review(revision, verdict, summary, labels)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue