Skip to content

Commit

Permalink
Merge pull request #75 from eDemocracia/dev
Browse files Browse the repository at this point in the history
fix facebook pipeline and COMPRESS_OFFLINE variable
  • Loading branch information
erivanio authored Dec 13, 2018
2 parents 8d6f751 + 29b5377 commit f6d29f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/apps/accounts/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ def save_profile(backend, user, response, *args, **kwargs):
birthdate = response.get('birthday', '')
if birthdate:
user.profile.birthdate = datetime.strptime(birthdate, '%m/%d/%Y')
location = response.get('location', '')
if location:
user.profile.country = location['name'].split(', ')[1]
try:
location = response.get('location', '')
if location:
user.profile.country = location['name'].split(', ')[1]
except IndexError:
pass
if user.profile.avatar:
user.profile.save()
else:
Expand Down
2 changes: 1 addition & 1 deletion src/edemocracia/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
COMPRESS_NODE_MODULES = NODE_MODULES
COMPRESS_NODE_SASS_BIN = os.path.join(NODE_MODULES, '.bin/node-sass')
COMPRESS_POSTCSS_BIN = os.path.join(NODE_MODULES, '.bin/postcss')
COMPRESS_OFFLINE = config('COMPRESS_OFFLINE', default=False)
COMPRESS_OFFLINE = config('COMPRESS_OFFLINE', cast=bool, default=False)

if not DEBUG:
COMPRESS_SCSS_COMPILER_CMD = '{node_sass_bin}' \
Expand Down

0 comments on commit f6d29f4

Please sign in to comment.