Submit: Reuse db in problemsForSubmittingChangeset
Change-Id: I80451a28a32564d28a292a58663976a05ce80561
This commit is contained in:
parent
55adf1e640
commit
b891a8e4c8
@ -212,13 +212,13 @@ public class Submit implements RestModifyView<RevisionResource, SubmitInput>,
|
||||
private String problemsForSubmittingChangeset(
|
||||
ChangeSet cs, IdentifiedUser identifiedUser) {
|
||||
try {
|
||||
ReviewDb db = dbProvider.get();
|
||||
for (PatchSet.Id psId : cs.patchIds()) {
|
||||
ReviewDb db = dbProvider.get();
|
||||
ChangeControl changeControl = changeControlFactory
|
||||
.controlFor(psId.getParentKey(), identifiedUser);
|
||||
ChangeData c = changeDataFactory.create(db, changeControl);
|
||||
|
||||
if (!changeControl.isVisible(dbProvider.get())) {
|
||||
if (!changeControl.isVisible(db)) {
|
||||
return BLOCKED_HIDDEN_SUBMIT_TOOLTIP;
|
||||
}
|
||||
if (!changeControl.canSubmit()) {
|
||||
|
Loading…
Reference in New Issue
Block a user