fedora-infra / fas

Fedora Account System
https://admin.fedoraproject.org/accounts
GNU General Public License v2.0
40 stars 50 forks source link

Be careful when updating user fields. #62

Closed ralphbean closed 10 years ago

ralphbean commented 10 years ago

In bug #42, fedmsg tells us that the user changed their gpg_keyid when they really did not. My guess is that this is fas updating a None value to the empty string ('') or vice versa.

The logic here first checks that at least one of the values (new or old) is True-ish before checking to see if they're different. If at least one of them is not false-ish and they are different, then we'll set the change in the db and publish to fedmsg.

pypingou commented 10 years ago

:+1: for me

ralphbean commented 10 years ago

Thanks for the review, @pypingou!