On Wed, 2016-11-16 at 16:58 +1100, Daniel Axtens wrote:
> Say we are sent the following:
> 
>           - [PATCH 0/2] A sample series
>             - [PATCH 1/2] test: Add some lorem ipsum
>             - Random message with diff
> 
> We expect that:
>  1) we parse normally without errors
>  2) we get a series with a cover letter and a patch
>  3) the random message is orphaned
> 
> What happens is that we get an integrity error, boiling down to:
> 
> (1048, "Column 'number' cannot be null")
> 
> This is caused because we believe that the random message belongs
> to the series because of the headers, but because there are no
> numbers in the Subject, we pass "None" into the number field of
> SeriesPatch. That turns into a null, and rightly hits an integrity
> error.
> 
> Fix this by requring that a message has a series _and_ a number
> before we try to add it to the series.
> 
> Add a test to verify correctness.
> 
> Reported-by: Daniel Wagner <[email protected]>
> Signed-off-by: Daniel Axtens <[email protected]>

Looks good to me. Appreciate the sanity check test.

Reviewed-by: Stephen Finucane <[email protected]>

...and applied. 
_______________________________________________
Patchwork mailing list
[email protected]
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to