Code review comment for lp:~linaro-infrastructure/linaro-ci-dashboard/sync-builds

Revision history for this message
Deepti B. Kalakeri (deeptik) wrote :

The build_number is always set to 1. I think this is because the save() operation on the build_loop object is called twice and the culprit seems to be in ./dashboard/frontend/models/loop.py schedule_build() function which calls the save twice. The first time when its called the value of the build_number is incremented properly but, the second time the build_number is set to None and hence the value gets reset to 1.
We need only one save() call in the schedule_build() the save() call before the

>> build.remote_number = self.server.schedule_job_build(self.name) can be removed and the one after the call can be retained.

This should fix the problem easily.

review: Needs Fixing (code)

« Back to merge proposal