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(-)

diff --git a/patchwork/parser.py b/patchwork/parser.py
index 1f3b3dd8901f..3d40b74375e0 100644
--- a/patchwork/parser.py
+++ b/patchwork/parser.py
@@ -349,7 +349,7 @@ def get_or_create_author(mail):
           # we lost the race to create the person
           person = Person.objects.get(email__iexact=email)

-    if name:  # use the latest provided name
+    if name and name != person.name:  # use the latest provided name
           person.name = name
           person.save()


--
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnel...@au1.ibm.com  IBM Australia Limited


--
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnel...@au1.ibm.com  IBM Australia Limited

_______________________________________________
Patchwork mailing list
Patchwork@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to