Merge "On null changes serialize the id as null"

This commit is contained in:
Jenkins 2013-09-27 20:52:06 +00:00 committed by Gerrit Code Review
commit 9b647087fb
2 changed files with 2 additions and 5 deletions

View File

@ -2848,7 +2848,7 @@ class TestScheduler(testtools.TestCase):
for q in p['change_queues']:
for head in q['heads']:
for change in head:
self.assertEqual(change['id'], 'None')
self.assertEqual(change['id'], None)
for job in change['jobs']:
status_jobs.add(job['name'])
self.assertIn('project-bitrot-stable-old', status_jobs)

View File

@ -770,11 +770,8 @@ class Ref(Changeish):
class NullChange(Changeish):
is_reportable = False
def __init__(self, project):
super(NullChange, self).__init__(project)
def _id(self):
return 'None'
return None
def equals(self, other):
return False