From 32bb4d94abd99e9192c1e70be1bfa276223ffafc Mon Sep 17 00:00:00 2001 From: Nikolai Kristiansen Date: Sat, 10 Nov 2012 22:55:44 +0100 Subject: [PATCH] Updates FB sync script --- scripts/facebook_sync.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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()