Fixing invalid premium_expire date.

This commit is contained in:
Samuel Clay 2014-05-12 12:14:06 -07:00
parent 10ca97e497
commit 2e2a1981bc

View file

@ -20,7 +20,7 @@
'is_premium' : {{ user.profile.is_premium|yesno:"true,false" }},
'is_admin' : {{ user.is_staff|yesno:"true,false" }},
'is_staff' : {{ user.is_staff|yesno:"true,false" }},
'premium_expire' : new Date('{{ user.profile.premium_expire|date:"Y-m-d" }}'),
'premium_expire' : {% if user.profile.premium_expire %}new Date('{{ user.profile.premium_expire|date:"Y-m-d" }}'){% else %}null{% endif %},
'secret_token' : "{{ user.profile.secret_token }}",
'username' : "{{ user.username|safe }}",
{% if user.pk %}'user_id' : {{ user.pk }},{% endif %}