diff --git a/scripts/facebook_sync.py b/scripts/facebook_sync.py index ca01a07..b1d8a03 100755 --- a/scripts/facebook_sync.py +++ b/scripts/facebook_sync.py @@ -40,7 +40,8 @@ for member in group_members: match = difflib.get_close_matches(member[0], names, 1) # max 1 match if match: u = UserProfile.objects.get(pk=name_lookup[match[0]]) - # Note: This is not correct, image is only kind of a textfield - u.image = 'https://graph.facebook.com/{0}/picture'.format(member[1]) - u.save() + if str(u.image) is "": + # Note: This is not correct, image is only kind of a textfield + u.image = 'https://graph.facebook.com/{0}/picture'.format(member[1]) + u.save()