~launchpad-results/launchpad-results/trunk

« back to all changes in this revision

Viewing changes to lib/lpresults/hardware/models/systemunithelper.py

  • Committer: Marc Tardif
  • Date: 2011-09-14 01:25:40 UTC
  • Revision ID: marc.tardif@canonical.com-20110914012540-1gs255vhv6kb0mg4
Added updating of submissions periodically.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
                self.system_unit = system_unit
35
35
 
36
36
    def _getSystemUnit(self):
37
 
        _series = self._system_unit
38
 
        series_id = self.system_unit_id
39
 
        if ((series_id is not None and not _series) or
40
 
            (_series is not None and _series.id != series_id)):
 
37
        _unit = self._system_unit
 
38
        unit_id = self.system_unit_id
 
39
        if ((unit_id is not None and not _unit) or
 
40
            (_unit is not None and _unit.id != unit_id)):
41
41
 
42
 
            self._system_unit = ISystemUnitSet(self).get(series_id)
 
42
            self._system_unit = ISystemUnitSet(self).get(unit_id)
43
43
 
44
44
        return self._system_unit
45
45