runbot/runbot_merge/models
Xavier Morel 5f8ad6a626 [IMP] runbot_merge: support for merging partners w/ github_login
The logic of the partner merge wizard is to collect all relevant data
from source partners, write them to a destination partner, then remove
the sources.

This... doesn't work when the field in question has a UNIQUE
constraint (like github_login), because it's going to copy the value
from a source onto a dest which will blow the constraint, and so the
copy fails. In that case the user first has to *move over* the unique
field's value then they can use the wizard.

Just fix for the github login: take all sources, remove (and store)
their github logins, then write the login onto the dst.

An alternative would have been to *defer* the constraint, however:

* it only works on unique constraints, not unique indexes
* it requires the constraint to be declared DEFERRABLE

Closes #301
2020-03-16 15:03:11 +01:00
..
__init__.py [ADD] runbot_merge: a merge bot 2018-09-03 13:16:36 +02:00
pull_requests.py [IMP] runbot_merge: non-empty fallback on fast-forward failure 2020-03-16 15:03:11 +01:00
res_partner.py [IMP] runbot_merge: support for merging partners w/ github_login 2020-03-16 15:03:11 +01:00