Skip to content

Commit

Permalink
Merge pull request #515 from fiji-flo/fix-mozillians-groups-publisher
Browse files Browse the repository at this point in the history
fix mozilliansorg groups updater
  • Loading branch information
fiji-flo authored Jul 2, 2020
2 parents d86836b + 77a6ae1 commit 990c7e4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ def _prepare_update(self, update):
update_profile = cis_profile.profile.User()
update_profile.user_id = current_profile.user_id
update_profile.active = current_profile.active
updated_groups = self._update_groups(update_profile.access_information.mozilliansorg["values"], update.groups)
if updated_groups == update_profile.access_information.mozilliansorg["values"]:
updated_groups = self._update_groups(current_profile.access_information.mozilliansorg["values"], update.groups)
if updated_groups == current_profile.access_information.mozilliansorg["values"]:
logger.info("No change in mozilliangsorg access information. Skipping.")
return None
update_profile.access_information.mozilliansorg["values"] = updated_groups
Expand All @@ -127,6 +127,8 @@ def _prepare_update(self, update):
except Exception as e:
logger.critical("Profile data signing failed for user {}: {}".format(update.user_id, e))
return None

logger.info("Merged groups for user {}".format(update.user_id))
return update_profile

@staticmethod
Expand Down

0 comments on commit 990c7e4

Please sign in to comment.