ChangeData: get reviewers from notes when applicable
Change-Id: I33253a5f7ac32045e5a7e5ff28cf4087dd7ffbcf
This commit is contained in:
parent
e759cd16ab
commit
cec9b3b959
@ -124,7 +124,16 @@ public class ApprovalsUtil {
|
||||
* exactly once in {@link SetMultimap#values()}, and
|
||||
* {@link ReviewerState#REMOVED} is not present.
|
||||
*/
|
||||
public static ImmutableSetMultimap<ReviewerState, Account.Id> getReviewers(
|
||||
public ImmutableSetMultimap<ReviewerState, Account.Id> getReviewers(
|
||||
ChangeNotes notes, Iterable<PatchSetApproval> allApprovals)
|
||||
throws OrmException {
|
||||
if (!migration.readPatchSetApprovals()) {
|
||||
return getReviewers(allApprovals);
|
||||
}
|
||||
return notes.load().getReviewers();
|
||||
}
|
||||
|
||||
private static ImmutableSetMultimap<ReviewerState, Account.Id> getReviewers(
|
||||
Iterable<PatchSetApproval> allApprovals) {
|
||||
PatchSetApproval first = null;
|
||||
SetMultimap<ReviewerState, Account.Id> reviewers =
|
||||
|
@ -475,7 +475,7 @@ public class ChangeData {
|
||||
|
||||
public SetMultimap<ReviewerState, Account.Id> reviewers()
|
||||
throws OrmException {
|
||||
return ApprovalsUtil.getReviewers(approvals());
|
||||
return approvalsUtil.getReviewers(notes(), approvals());
|
||||
}
|
||||
|
||||
public Collection<PatchLineComment> comments()
|
||||
|
Loading…
Reference in New Issue
Block a user