Commit de8706a2 authored by Arkadiusz Hiler's avatar Arkadiusz Hiler

revision: Don't mark as a rerun unless explicitly set

Whenever we are duplicating metadata about a revision let's clean the
rerun state.

Without this all revisions to series that had been rerun were stuck in
the "this is a rerun" state, even if updated version of the patches were
sent.

Fixes #31Signed-off-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent df06fe11
Pipeline #117589 passed with stage
in 1 minute and 31 seconds
......@@ -700,6 +700,7 @@ class SeriesRevision(models.Model):
new.test_state = None
new.skip_testing = False
new.skip_requester = None
new.is_rerun = False
new.save()
return new
......
......@@ -878,6 +878,18 @@ class SeriesRevisionTest(GeneratedSeriesTest):
self.assertEqual(dup.raw_cover_letter_headers,
org.raw_cover_letter_headers)
def testDuplicateMetaShouldResetRerunState(self):
(test_series, mails) = self._create_series(1)
test_series.insert(mails)
series = Series.objects.all()[0]
org = series.revisions()[0]
org.is_rerun = True
org.save()
dup = org.duplicate_meta()
self.assertFalse(dup.is_rerun)
#
# series-new-revision event tests
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment