Skip to content

Commit

Permalink
Dirty workaround for the users with blank passwords (eg admin fixture)
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo Chatzimichos committed Nov 18, 2012
1 parent f4c6b01 commit 5555485
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cronos/accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,13 @@ def settings_accounts(request):
declaration_form = DeclarationForm()
grades_form = GradesForm()
eclass_lessons_form = EclassLessonsForm()
if request.user.get_profile().dionysos_password:
raw_dionysos_password = decrypt_password(request.user.get_profile().dionysos_password),
else:
raw_dionysos_password = None
student = Cronos(
request.user.get_profile().dionysos_username,
decrypt_password(request.user.get_profile().dionysos_password),
raw_dionysos_password,
)
if request.user.get_profile().eclass_username:
student.eclass_username = request.user.get_profile().eclass_username
Expand Down

0 comments on commit 5555485

Please sign in to comment.