fix: update profile (#223)

* fix: update profile

* Update management.proto

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi 2020-06-16 07:03:31 +02:00 committed by GitHub
parent 1dd82ab1b7
commit 64b14b4e19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,10 +34,10 @@ func (p *Profile) Changes(changed *Profile) map[string]interface{} {
if changed.DisplayName != p.DisplayName {
changes["displayName"] = changed.DisplayName
}
if p.PreferredLanguage != language.Und && changed.PreferredLanguage != p.PreferredLanguage {
if changed.PreferredLanguage != language.Und && changed.PreferredLanguage != p.PreferredLanguage {
changes["preferredLanguage"] = changed.PreferredLanguage
}
if p.Gender > 0 && changed.Gender != p.Gender {
if changed.Gender != p.Gender {
changes["gender"] = changed.Gender
}
return changes