Re: [PATCH 7/9] parser: avoid an unnecessary UPDATE of Person

2018-02-22 Thread Andrew Donnellan
On 23/02/18 00:46, Daniel Axtens wrote: Wouldn't that mean a new null name would overwrite a previously saved name? I... somehow didn't think about that case. Yes. Of course. Andrew Regards, Daniel --- patchwork/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

Re: [PATCH 7/9] parser: avoid an unnecessary UPDATE of Person

2018-02-22 Thread Daniel Axtens
Andrew Donnellan writes: > On 22/02/18 01:17, Daniel Axtens wrote: >> Analysis of SQL statements showed that when parsing an email, the row >> for the Person who sent the email was always getting updated. This is >> because the test for updating it only checks if the incoming mail has >> *a* name

Re: [PATCH 7/9] parser: avoid an unnecessary UPDATE of Person

2018-02-21 Thread Andrew Donnellan
On 22/02/18 01:17, Daniel Axtens wrote: Analysis of SQL statements showed that when parsing an email, the row for the Person who sent the email was always getting updated. This is because the test for updating it only checks if the incoming mail has *a* name attached to the email address, and not

[PATCH 7/9] parser: avoid an unnecessary UPDATE of Person

2018-02-21 Thread Daniel Axtens
Analysis of SQL statements showed that when parsing an email, the row for the Person who sent the email was always getting updated. This is because the test for updating it only checks if the incoming mail has *a* name attached to the email address, and not if it has a new name. Django is not smart