With API V3 we have some relationships (like lastBuild on branch) specified as asynchronuous, so sometimes we may deal with promises. This commit fixes the situation by handling both plain records and promises.
It's mostly relevant in tests, because service is destroyed when test end and then we don't want to run any timers.