Fix group suggestions when adding a group to groups

Group suggestion is currently broken in GWT UI. This commit fixes it by
adding a null check on the project name (which is not required at all
times).

Change-Id: I2c3637473f7447da56ff5f9b38dfc244c8bc8ad5
This commit is contained in:
Patrick Hiesel
2016-05-30 11:56:12 +02:00
parent b574e5f004
commit 7791aec127

View File

@@ -35,7 +35,9 @@ public class AccountGroupSuggestOracle extends SuggestAfterTypingNCharsOracle {
@Override
public void _onRequestSuggestions(final Request req, final Callback callback) {
GroupMap.suggestAccountGroupForProject(
projectName.get(), req.getQuery(), req.getLimit(),
projectName == null ? null : projectName.get(),
req.getQuery(),
req.getLimit(),
new GerritCallback<GroupMap>() {
@Override
public void onSuccess(GroupMap result) {