Fix #1283569. Fix #1294243.
Fix #1283569. Fix #1294243.

https://bugs.launchpad.net/lava-server/+bug/1283569
https://bugs.launchpad.net/lava-project/+bug/1294243

Change-Id: Ia2020877203c3ef6764b69f1ed9ac4fd86f09f7d

Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,OSSystems/lava-server,Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server