Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes the logic for avatar save checks #2734

Merged
merged 1 commit into from
Nov 8, 2018

Conversation

owocki
Copy link
Contributor

@owocki owocki commented Nov 8, 2018

previous_* was being set every time, when really it should only updated if the field its dervied from is updated

per https://gitcoincore.slack.com/archives/CBZEHJCN7/p1541628897002900

@@ -82,14 +82,14 @@ def save(self, *args, force_insert=False, force_update=False, **kwargs):
"""Override the save to perform change comparison against PNG and SVG fields."""
if (self.svg != self.__previous_svg) or (self.svg and not self.custom_avatar_png):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alternatively we could just remove the if statement and update every single time

Copy link
Contributor

@mbeacom mbeacom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - thanks!

@mbeacom mbeacom merged commit ffd7a2e into master Nov 8, 2018
@mbeacom mbeacom deleted the kevin/run_avatar_conversion_every_time branch November 8, 2018 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants