Assignee in ReviewDb.

Change-Id: I27c8823b349c79804c64207585d42f608d4319a8
This commit is contained in:
Gustaf Lundh
2016-09-22 17:38:06 +02:00
committed by Sven Selberg
parent ff7679320a
commit 138aec1244
18 changed files with 80 additions and 93 deletions

View File

@@ -296,12 +296,12 @@ public class ChangeField {
/** The user assigned to the change. */
public static final FieldDef<ChangeData, Integer> ASSIGNEE =
new FieldDef.Single<ChangeData, Integer>(
ChangeQueryBuilder.FIELD_ASSIGNEE, FieldType.INTEGER, true) {
ChangeQueryBuilder.FIELD_ASSIGNEE, FieldType.INTEGER, false) {
@Override
public Integer get(ChangeData input, FillArgs args)
throws OrmException {
Optional<Account.Id> id = input.assignee();
return id.isPresent() ? id.get().get() : NO_ASSIGNEE;
Account.Id id = input.change().getAssignee();
return id != null ? id.get() : NO_ASSIGNEE;
}
};