Throw an exception when a referenced group is not found

Change-Id: Id3c61dcf70492ba05475df4656fd89bad40c9324
This commit is contained in:
Alice Kober-Sotzek
2017-07-28 18:30:10 +02:00
parent 04a2720fb6
commit 4a0057373d
21 changed files with 184 additions and 178 deletions

View File

@@ -130,7 +130,7 @@ public class AccountCreator {
if (groupNames != null) {
for (String n : groupNames) {
AccountGroup.NameKey k = new AccountGroup.NameKey(n);
Optional<AccountGroup> group = groups.get(db, k);
Optional<AccountGroup> group = groups.getGroup(db, k);
if (!group.isPresent()) {
throw new NoSuchGroupException(n);
}